From b0f0a1e942376c5b14e60967c132faf733c19583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 28 Dec 2018 14:05:02 +0100 Subject: [PATCH] tag: add realtime unit MSECS (milliseconds) --- tag.c | 3 +++ tag.h | 1 + 2 files changed, 4 insertions(+) diff --git a/tag.c b/tag.c index 9d6e040..70dbdcf 100644 --- a/tag.c +++ b/tag.c @@ -126,6 +126,9 @@ int_refresh_in(const struct tag *tag, long units) if (tag->owner == NULL || tag->owner->refresh_in == NULL) return false; + assert(priv->value_as_int.realtime_unit == TAG_REALTIME_SECS || + priv->value_as_int.realtime_unit == TAG_REALTIME_MSECS); + long milli_seconds = units; if (priv->value_as_int.realtime_unit == TAG_REALTIME_SECS) milli_seconds *= 1000; diff --git a/tag.h b/tag.h index 887cb67..8b4a1f9 100644 --- a/tag.h +++ b/tag.h @@ -7,6 +7,7 @@ enum tag_realtime_unit { TAG_REALTIME_NONE, TAG_REALTIME_SECS, + TAG_REALTIME_MSECS, }; struct module;