Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
cross-platform sleep function
#include <iostream> #include <time.h> using namespace std; void sleepcp(int milliseconds); void sleepcp(int milliseconds) // cross-platform sleep function { clock_t time_end; time_end = clock() + milliseconds * CLOCKS_PER_SEC/1000; while (clock() < time_end) { } } int main() { cout << "Hi! At the count to 3, I'll die! :)" << endl; sleepcp(3000); cout << "urrrrggghhhh!" << endl; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
hangman
cv2
What exactly is “broken” with Microsoft Visual C++'s two-phase template instantiation?
VC++ error LNK2001 with combined use of non-type template parameters
C++ Assignment..
infix to postfix v 3.0 with improved eval()
multiplie linked list numbers
Even Odd
Is a Union Member's Destructor Called
list multiply
Please log in to post a comment.