From 02617f334ce01cf95ce3ac49c05ac5a886a9aecc Mon Sep 17 00:00:00 2001 From: Patrick Shan Date: Mon, 30 Dec 2013 22:43:13 +1100 Subject: * make cpu status cached for 10s and leave the output index to 0 --- examples/sysdata.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/sysdata.py b/examples/sysdata.py index 235808f..14aefb3 100644 --- a/examples/sysdata.py +++ b/examples/sysdata.py @@ -111,7 +111,8 @@ class Py3status: response['color'] = i3status_config['color_bad'] response['full_text'] = "CPU: %.2f%%" % (used_cpu_percent*100) - response['cached_until'] = time() + #cache the status for 10 seconds + response['cached_until'] = time() + 10 return (0, response) @@ -133,4 +134,4 @@ class Py3status: (used_mem, total_mem, used_mem_percent) response['cached_until'] = time() - return (1, response) + return (0, response) -- cgit v1.3