Changes in uspace/app/testread/testread.c [1ab8539:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/testread/testread.c
r1ab8539 r9d58539 123 123 struct timeval prev_time; 124 124 struct timeval start_time; 125 gettimeofday(&start_time, NULL); 125 int rc; 126 rc = gettimeofday(&start_time, NULL); 127 if (rc != EOK) { 128 printf("gettimeofday failed\n"); 129 fclose(file); 130 free(buf); 131 return 1; 132 } 126 133 prev_time = start_time; 127 134 … … 148 155 if (progress && offset >= next_mark) { 149 156 struct timeval cur_time; 150 gettimeofday(&cur_time, NULL); 151 157 rc = gettimeofday(&cur_time, NULL); 158 if (rc != EOK) { 159 printf("gettimeofday failed\n"); 160 fclose(file); 161 free(buf); 162 return 1; 163 } 152 164 uint32_t last_run = cur_time.tv_sec - prev_time.tv_sec; 153 165 uint32_t total_time = cur_time.tv_sec - start_time.tv_sec; … … 166 178 167 179 struct timeval final_time; 168 gettimeofday(&final_time, NULL); 180 rc = gettimeofday(&final_time, NULL); 181 if (rc != EOK) { 182 printf("gettimeofday failed\n"); 183 fclose(file); 184 free(buf); 185 return 1; 186 } 169 187 170 188 uint32_t total_run_time = final_time.tv_sec - start_time.tv_sec;
Note:
See TracChangeset
for help on using the changeset viewer.