Skip to content

Instantly share code, notes, and snippets.

@Code-Hex
Created July 24, 2015 03:16
Show Gist options
  • Save Code-Hex/dd6ec4d8284b863cfe73 to your computer and use it in GitHub Desktop.
Save Code-Hex/dd6ec4d8284b863cfe73 to your computer and use it in GitHub Desktop.
ssleep
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