mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-25 05:15:41 +02:00
tag: add realtime unit MSECS (milliseconds)
This commit is contained in:
parent
13cc11e200
commit
b0f0a1e942
2 changed files with 4 additions and 0 deletions
3
tag.c
3
tag.c
|
@ -126,6 +126,9 @@ int_refresh_in(const struct tag *tag, long units)
|
||||||
if (tag->owner == NULL || tag->owner->refresh_in == NULL)
|
if (tag->owner == NULL || tag->owner->refresh_in == NULL)
|
||||||
return false;
|
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;
|
long milli_seconds = units;
|
||||||
if (priv->value_as_int.realtime_unit == TAG_REALTIME_SECS)
|
if (priv->value_as_int.realtime_unit == TAG_REALTIME_SECS)
|
||||||
milli_seconds *= 1000;
|
milli_seconds *= 1000;
|
||||||
|
|
1
tag.h
1
tag.h
|
@ -7,6 +7,7 @@
|
||||||
enum tag_realtime_unit {
|
enum tag_realtime_unit {
|
||||||
TAG_REALTIME_NONE,
|
TAG_REALTIME_NONE,
|
||||||
TAG_REALTIME_SECS,
|
TAG_REALTIME_SECS,
|
||||||
|
TAG_REALTIME_MSECS,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct module;
|
struct module;
|
||||||
|
|
Loading…
Add table
Reference in a new issue