Skip to content

Commit 39ce549

Browse files
committed
PollChange can be forced to update on next call to poll()
1 parent 119e594 commit 39ce549

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

util/poll_change.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public:
1212
change_detected = true;
1313
}
1414

15+
void force_next_poll() {
16+
last_update_time = 0;
17+
}
18+
1519
void poll(unsigned now, bool state) {
1620
if (now - last_update_time >= update_ticks) {
1721
last_update_time = now;

0 commit comments

Comments
 (0)