Changeset bfe4a88b in mainline
- Timestamp:
- 2025-05-10T14:07:54Z (4 weeks ago)
- Children:
- 287b2ea
- Parents:
- 7e68d61
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdwrite/bdwrite.c
r7e68d61 rbfe4a88b 1 1 /* 2 * Copyright (c) 202 4Miroslav Cimerman2 * Copyright (c) 2025 Miroslav Cimerman 3 3 * All rights reserved. 4 4 * … … 41 41 #include <stdio.h> 42 42 #include <abi/ipc/ipc.h> 43 #include <perf.h> 43 44 44 45 static void usage(void); … … 113 114 goto end; 114 115 } 116 117 stopwatch_t stopwatch; 118 stopwatch_init(&stopwatch); 119 stopwatch_start(&stopwatch); 120 115 121 uint64_t left = blkcnt; 116 122 while (left != 0) { … … 131 137 } 132 138 end: 139 stopwatch_stop(&stopwatch); 140 nsec_t t = stopwatch_get_nanos(&stopwatch); 141 printf("Elapsed time:\n"); 142 printf("\t%llu ms\n", NSEC2MSEC(t)); 143 printf("\t%lf s\n", NSEC2SEC((double)t)); 133 144 free(buf); 134 145 block_fini(dev);
Note:
See TracChangeset
for help on using the changeset viewer.