Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <time.h>
- /*
- * $ time ./time
- *
- * real 0m6.183s
- * user 0m1.225s
- * sys 0m4.959s
- * $ export TZ=Europe/Rome
- * $ time ./time
- *
- * real 0m0.444s
- * user 0m0.443s
- * sys 0m0.000s
- */
- int main(int argc, char *argv[])
- {
- int i = 0;
- time_t timep;
- for (i = 0; i < 5000000; i++) {
- time(&timep);
- localtime(&timep);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement