Created
May 23, 2018 19:35
-
-
Save danrl/bb3bbad695422ee1593b7b47bdac83a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#include <time.h> | |
int main(int argc, char *argv[]) { | |
// run for 10 seconds | |
time_t end = time(0) + 10; | |
// do something | |
volatile int i; | |
while (time(0) < end) { | |
i++; | |
} | |
// exit ok | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment