aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.h')
-rw-r--r--src/libutil/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.h b/src/libutil/util.h
index 447e72324..8bee11b5f 100644
--- a/src/libutil/util.h
+++ b/src/libutil/util.h
@@ -203,7 +203,7 @@ void g_ptr_array_insert (GPtrArray *array, gint index_, gpointer data);
((dbl) - (int)(dbl)) * 1e9; \
} while (0)
#define tv_to_msec(tv) ((tv)->tv_sec * 1000LLU + (tv)->tv_usec / 1000LLU)
-#define tv_to_double(tv) ((tv)->tv_sec + (tv)->tv_usec / 1e6f)
+#define tv_to_double(tv) ((double)(tv)->tv_sec + (tv)->tv_usec / 1.0e6)
#define ts_to_usec(ts) ((ts)->tv_sec * 1000000LLU + \
(ts)->tv_nsec / 1000LLU)