mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 21:05:40 +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)
|
||||
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;
|
||||
|
|
1
tag.h
1
tag.h
|
@ -7,6 +7,7 @@
|
|||
enum tag_realtime_unit {
|
||||
TAG_REALTIME_NONE,
|
||||
TAG_REALTIME_SECS,
|
||||
TAG_REALTIME_MSECS,
|
||||
};
|
||||
|
||||
struct module;
|
||||
|
|
Loading…
Add table
Reference in a new issue