From 124cd1a8573e0d8ea37a9d2239295bc347422579 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 23 Oct 2016 11:11:12 +0100 Subject: [PATCH] [Fix] Fix float usage in util:get_time Issue: #1065 Reported by: @AlexeySa --- src/libutil/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5