1
0
This repository has been archived on 2025-11-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ss-monorepo/P1/smt4497-P1/smt4497-P1a.cpp
2025-10-10 02:17:07 +02:00

21 lines
282 B
C++

#include "smt4497-P1.h"
int esperaPulseTecla(int toutMs)
{
int res = 0;
int antes = GetTickCount();
int ahora;
do {
if (_kbhit())
{
res = _getch();
break;
}
if (toutMs > 0)
Sleep(1);
ahora = GetTickCount();
} while (ahora - antes < toutMs);
return res;
}