Changeset b412168 in mainline for uspace/app/bnchmark/bnchmark.c
- Timestamp:
- 2014-11-17T03:25:04Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6069061
- Parents:
- ef3da5a (diff), 5042706 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bnchmark/bnchmark.c
ref3da5a rb412168 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.