Created
January 26, 2018 05:34
-
-
Save kevr/72a129a436ef6eccf94ab20bc7847849 to your computer and use it in GitHub Desktop.
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
static void delay(unsigned long ms) | |
{ | |
struct timespec tv; | |
memset(&tv, 0, sizeof(tv)); | |
tv.tv_sec = 0; | |
tv.tv_nsec = 1000000L * ms; | |
nanosleep(&tv, NULL); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment