Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <time.h>
- /*
- $ gcc -Wall -O3 time.c -o time
- $ time ./time
- real 0m7.102s
- user 0m2.060s
- sys 0m5.040s
- $ time TZ=:/etc/localtime ./time
- real 0m0.952s
- user 0m0.948s
- sys 0m0.000s
- */
- int main(int argc, char *argv[])
- {
- int i = 0;
- time_t timep;
- for (i = 0; i < 10000000; i++) {
- time(&timep);
- localtime(&timep);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement