• Как сделать таймер на с++(на андроид)
    Не с помощью sleep(это не работает)
    Пж помогите

Ответы 1

  • #include<iostream>#include <ctime>using namespace std;void startTimer(int ms) {    clock_t end_time = clock() + ms * (CLOCKS_PER_SEC / 1000);    while (clock() < end_time) {}}int main () {    cout << "Waitig for 5 seconds..." << endl;    startTimer(5000); // 5s -> 5000ms    cout << "5 seconds left.";    cin.ignore();    return 0;}
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years