From 232b6d4ec721ecc52a1525afe5a1ca9762ca70bb Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Tue, 10 Feb 2015 19:48:00 +0100 Subject: lower the click event refresh mechanism rate limit to 100ms --- py3status/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'py3status/__init__.py') diff --git a/py3status/__init__.py b/py3status/__init__.py index 65f3d2f..25b994b 100755 --- a/py3status/__init__.py +++ b/py3status/__init__.py @@ -542,7 +542,7 @@ class Events(Thread): """ Force a cache expiration for all the methods of the given module. - We rate limit the i3status refresh to 1/s for obvious abusive behavior. + We rate limit the i3status refresh to 100ms for obvious abusive behavior. """ module = self.modules.get(module_name) if module is not None: @@ -551,7 +551,7 @@ class Events(Thread): for obj in module.methods.values(): obj['cached_until'] = time() else: - if time() > (self.last_refresh_ts + 1): + if time() > (self.last_refresh_ts + 0.1): if self.config['debug']: syslog( LOG_INFO, @@ -565,9 +565,9 @@ class Events(Thread): Force a full refresh of py3status and i3status modules by sending a SIGUSR1 signal to py3status. - We rate limit this command to 1/s for obvious abusive behavior. + We rate limit this command to 100ms for obvious abusive behavior. """ - if time() > (self.last_refresh_ts + 1): + if time() > (self.last_refresh_ts + 0.1): call(['killall', '-s', 'USR1', 'py3status']) self.last_refresh_ts = time() -- cgit v1.3