Last active
November 14, 2015 00:28
-
-
Save rasgo-cc/6903c1c165fcd4b891db to your computer and use it in GitHub Desktop.
Decrement integer without volatile
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
#include <stdio.h> | |
#include <stdint.h> | |
#include <time.h> | |
int main() | |
{ | |
puts("Lets go"); | |
time_t t; | |
int elapsed_time = time(&t); | |
uint32_t i = 999999999; | |
for( ; i > 0 ; i--); | |
elapsed_time = time(&t) - elapsed_time; | |
printf("Elapsed time: %ds\n", elapsed_time); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment