Skip to content

Commit 0c26715

Browse files
committed
Fix timer interval
1 parent 633b8ec commit 0c26715

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ksf/misc/ksSimpleTimer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ namespace ksf::misc
2828

2929
bool ksSimpleTimer::hasTimePassed() const
3030
{
31+
/* If interval is set to 0, it means the timer is disabled. */
32+
if (intervalMs == 0)
33+
return false;
34+
3135
return intervalMs && millis() - lastTriggerTimeMs > intervalMs;
3236
}
3337

0 commit comments

Comments
 (0)