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