X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=522901a993e89f70d6f075ac9e5c2ebd52e77eae;hp=266595262e6fc2ce3595bdeabb12111480036e70;hb=f00b210f73a8562c2cc64d73aee04875d25162b0;hpb=f3afa57e36550288340f1b6c694f354ae72654b9 diff --git a/stat.c b/stat.c index 26659526..522901a9 100644 --- a/stat.c +++ b/stat.c @@ -16,7 +16,11 @@ void update_rusage_stat(struct thread_data *td) { struct thread_stat *ts = &td->ts; +#ifdef RUSAGE_THREAD + getrusage(RUSAGE_THREAD, &td->ru_end); +#else getrusage(RUSAGE_SELF, &td->ru_end); +#endif ts->usr_time += mtime_since(&td->ru_start.ru_utime, &td->ru_end.ru_utime); @@ -534,7 +538,7 @@ void show_thread_status(struct thread_stat *ts, struct group_run_stats *rs) return; time(&time_p); - ctime_r((const time_t *) &time_p, time_buf); + os_ctime_r((const time_t *) &time_p, time_buf, sizeof(time_buf)); if (!ts->error) { log_info("%s: (groupid=%d, jobs=%d): err=%2d: pid=%d: %s",