Changeset 5a6cc679 in mainline for uspace/app/bnchmark/bnchmark.c
- Timestamp:
- 2018-01-31T02:21:24Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a0a9cc2
- Parents:
- 132ab5d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bnchmark/bnchmark.c
r132ab5d1 r5a6cc679 54 54 #define MBYTE (1024*1024) 55 55 56 typedef int(*measure_func_t)(void *);56 typedef errno_t(*measure_func_t)(void *); 57 57 typedef unsigned long umseconds_t; /* milliseconds */ 58 58 59 59 static void syntax_print(void); 60 60 61 static int measure(measure_func_t fn, void* data, umseconds_t *result)61 static errno_t measure(measure_func_t fn, void* data, umseconds_t *result) 62 62 { 63 63 struct timeval start_time; 64 64 gettimeofday(&start_time, NULL); 65 65 66 int rc = fn(data);66 errno_t rc = fn(data); 67 67 if (rc != EOK) { 68 68 fprintf(stderr, "measured function failed\n"); … … 79 79 } 80 80 81 static int sequential_read_file(void *data)81 static errno_t sequential_read_file(void *data) 82 82 { 83 83 char *path = (char *) data; … … 109 109 } 110 110 111 static int sequential_read_dir(void *data)111 static errno_t sequential_read_dir(void *data) 112 112 { 113 113 char *path = (char *) data; … … 131 131 int main(int argc, char **argv) 132 132 { 133 int rc;133 errno_t rc; 134 134 umseconds_t milliseconds_taken = 0; 135 135 char *path = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.