Created
July 24, 2015 03:16
-
-
Save Code-Hex/dd6ec4d8284b863cfe73 to your computer and use it in GitHub Desktop.
ssleep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ssleep(int msec) { | |
struct timespec tm; | |
tm.tv_sec = 0; | |
tm.tv_nsec = msec * 1000L * 1000L; | |
nanosleep(&tm, NULL); | |
} | |
/* | |
how to use !! | |
ssleep(500); | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment