From e9568c8e3180d16e5224fbe5c3cf4414f8c0c1c9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 2 Feb 2023 08:36:44 -0500 Subject: [PATCH] MT#56493 move now_double() to recaux.h Change-Id: I672dfb3d05c5a4685aae794556b456ca28b990c8 --- recording-daemon/db.c | 7 +------ recording-daemon/recaux.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/recording-daemon/db.c b/recording-daemon/db.c index c2c87621d..2f39f213c 100644 --- a/recording-daemon/db.c +++ b/recording-daemon/db.c @@ -8,6 +8,7 @@ #include "main.h" #include "log.h" #include "tag.h" +#include "recaux.h" /* @@ -249,12 +250,6 @@ err: } -static double now_double(void) { - struct timeval tv; - gettimeofday(&tv, NULL); - return tv.tv_sec + tv.tv_usec / 1000000.0; -} - static void db_do_call_id(metafile_t *mf) { if (mf->db_id > 0) return; diff --git a/recording-daemon/recaux.h b/recording-daemon/recaux.h index 876dcddd4..3f65f3cc9 100644 --- a/recording-daemon/recaux.h +++ b/recording-daemon/recaux.h @@ -6,4 +6,16 @@ extern __thread int __sscanf_hack_var; #define sscanf_match(str, format, ...) __sscanf_match(str, format "%n", ##__VA_ARGS__, &__sscanf_hack_var) int __sscanf_match(const char *str, const char *fmt, ...) __attribute__ ((__format__ (__scanf__, 2, 3))); + +#include +#include +#include "compat.h" + +INLINE double now_double(void) { + struct timeval tv; + gettimeofday(&tv, NULL); + return tv.tv_sec + tv.tv_usec / 1000000.0; +} + + #endif