Guest User

Untitled

a guest
Dec 11th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <time.h>
  4.  
  5. volatile uint64_t a,b;
  6.  
  7. int main()
  8. {
  9. int i;
  10. clock_t start,end;
  11. for (i=0;i<10000000;i++){
  12. a = b * a * i;
  13. }
  14. start = clock();
  15. for (i=0;i<10000000;i++){
  16. a = b * a * i;
  17. }
  18. end = clock();
  19. printf("start %ld end %ld diff %ld\n", start, end, end-start);
  20. }
Add Comment
Please, Sign In to add comment