mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-17 18:45:10 +00:00
$curl can now use 0 (immediately) as interval
This commit is contained in:
parent
89c2d4ecdd
commit
bc5a414594
@ -675,8 +675,8 @@
|
||||
</term>
|
||||
<listitem>
|
||||
Download data from URI using Curl at the
|
||||
specified interval. The interval may be a floating
|
||||
point value greater than 0, otherwise defaults to 15
|
||||
specified interval. The interval may be a positive floating
|
||||
point value (0 is allowed), otherwise defaults to 15
|
||||
minutes. Most useful when used in conjunction with Lua
|
||||
and the Lua API. This object is threaded, and once a
|
||||
thread is created it can't be explicitly destroyed.
|
||||
|
@ -222,7 +222,7 @@ void curl_parse_arg(struct text_object *obj, const char *arg)
|
||||
NORM_ERR("wrong number of arguments for $curl");
|
||||
return;
|
||||
}
|
||||
cd->interval = interval > 0 ? interval * 60 : 15*60;
|
||||
cd->interval = (argc == 2 && interval >= 0) ? interval * 60 : 15*60;
|
||||
obj->data.opaque = cd;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user