comparison util/timer.lua @ 14192:e58de351880f

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Tue, 26 May 2026 11:47:33 +0100
parents 9b0a65e64697
children
comparison
equal deleted inserted replaced
14188:dbbafef0748f 14192:e58de351880f
107 return result, item, result_sync; 107 return result, item, result_sync;
108 end 108 end
109 local function reschedule(id, delay) 109 local function reschedule(id, delay)
110 local current_time = get_time(); 110 local current_time = get_time();
111 local event_time = current_time + delay; 111 local event_time = current_time + delay;
112 h:reprioritize(id, delay); 112 h:reprioritize(id, event_time);
113 if next_time == nil or event_time < next_time then 113 if next_time == nil or event_time < next_time then
114 next_time = event_time; 114 next_time = event_time;
115 _add_task(next_time - current_time, _on_timer); 115 _add_task(next_time - current_time, _on_timer);
116 end 116 end
117 return id; 117 return id;