Jak w C++ zrobić pauzę, np. 5 sekund?
Inaczej: Jaki jest odpowiednik Pascalowego delay(5000); w C++?
Wariant 1:
void sleep(int ms){ clock_t target = clock() + ms; while (clock() < target) ;}
Wymaga `time.h `
Wariant 2 (Windows only):
`Sleep` z `windows.h`
" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
Wariant 1:
void sleep(int ms)
{
clock_t target = clock() + ms;
while (clock() < target) ;
}
Wymaga `time.h `
Wariant 2 (Windows only):
`Sleep` z `windows.h`