X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=bin%2Fkhatus_bar;h=ed3d8c4a8abc917124bbefa653dd6017161fd5d6;hb=f2273cab04f5f7b9188b9bd62b0e7be928054c28;hp=e2e505ce85e4c0bed0578e143bf78096ce436057;hpb=bd3e26c879dada3c8ba006b0169f67d441ec6f6d;p=khatus.git diff --git a/bin/khatus_bar b/bin/khatus_bar index e2e505c..ed3d8c4 100755 --- a/bin/khatus_bar +++ b/bin/khatus_bar @@ -23,9 +23,6 @@ $2 == "khatus_sensor_datetime" { print_msg_ok("status_bar", make_status_bar()) } -# Let everything else through -// - # ----------------------------------------------------------------------------- # Data # ----------------------------------------------------------------------------- @@ -50,11 +47,11 @@ function Data_update( src, key, val, len_line, len_head, len_val, time) { } } -function Data_get(src, key, age_max, time, age, is_expired) { +function Data_get(src, key, ttl, time, age, is_expired) { time = Data_get_time() A_time[src, key] = time age = time - M_time[src, key] - is_expired = age_max && age > age_max + is_expired = ttl && age > ttl return is_expired ? "" : Data[src, key] }