Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <time.h>
  2. #include <stdio.h>
  3.  
  4. int main(void)
  5. {
  6. clock_t begin = clock();
  7. int a = 1 + 1;
  8. clock_t end = clock();
  9. double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;
  10. printf("%f seconds\n", time_spent); // Returns something like 0.000002 seconds
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement