summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/timestamp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c
index 6885e7b55b..f84b9d5bc7 100644
--- a/src/lib/timestamp.c
+++ b/src/lib/timestamp.c
@@ -125,9 +125,6 @@ static struct timestamp_table *timestamp_table_get(void)
MAYBE_STATIC struct timestamp_table *ts_table = NULL;
struct timestamp_cache *ts_cache;
- if (!timestamp_should_run())
- return NULL;
-
if (ts_table != NULL)
return ts_table;
@@ -188,6 +185,9 @@ void timestamp_add(enum timestamp_id id, uint64_t ts_time)
{
struct timestamp_table *ts_table;
+ if (!timestamp_should_run())
+ return;
+
ts_table = timestamp_table_get();
if (!ts_table) {