Fix Windows build by defining clock sources and adding include file.
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index af6e1f2efe9a6864137e5600d2520f754863ae70..8e1034b513fd162dbc539eacdcf2640cfa4ff88d 100644 (file)
--- a/stat.c
+++ b/stat.c
 #include "diskutil.h"
 #include "lib/ieee754.h"
 #include "json.h"
+#include "lib/getrusage.h"
 
 void update_rusage_stat(struct thread_data *td)
 {
        struct thread_stat *ts = &td->ts;
 
-#ifdef FIO_HAVE_RUSAGE_THREAD
-       getrusage(RUSAGE_THREAD, &td->ru_end);
-#else
-       getrusage(RUSAGE_SELF, &td->ru_end);
-#endif
-
+       fio_getrusage(&td->ru_end);
        ts->usr_time += mtime_since(&td->ru_start.ru_utime,
                                        &td->ru_end.ru_utime);
        ts->sys_time += mtime_since(&td->ru_start.ru_stime,