1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

$curl can now use 0 (immediately) as interval

This commit is contained in:
Nikolas Garofil 2010-04-19 17:19:56 +02:00
parent 89c2d4ecdd
commit bc5a414594
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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;
}