Changes in uspace/app/bnchmark/bnchmark.c [c4f7bf6:1ab8539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bnchmark/bnchmark.c
rc4f7bf6 r1ab8539 62 62 { 63 63 struct timeval start_time; 64 int rc; 65 rc = gettimeofday(&start_time, NULL); 66 if (rc != EOK) { 67 fprintf(stderr, "gettimeofday failed\n"); 68 return rc; 69 } 70 71 rc = fn(data); 64 gettimeofday(&start_time, NULL); 65 66 int rc = fn(data); 72 67 if (rc != EOK) { 73 68 fprintf(stderr, "measured function failed\n"); 74 69 return rc; 75 70 } 76 71 77 72 struct timeval final_time; 78 rc = gettimeofday(&final_time, NULL); 79 if (rc != EOK) { 80 fprintf(stderr, "gettimeofday failed\n"); 81 return rc; 82 } 73 gettimeofday(&final_time, NULL); 83 74 84 75 /* Calculate time difference in milliseconds */ … … 92 83 char *path = (char *) data; 93 84 char *buf = malloc(BUFSIZE); 94 95 if (buf == NULL) {85 86 if (buf == NULL) 96 87 return ENOMEM; 97 }98 88 99 89 FILE *file = fopen(path, "r");
Note:
See TracChangeset
for help on using the changeset viewer.