Skip to content

Commit a28b4de

Browse files
committed
improve time_left_ms
1 parent 95f4d45 commit a28b4de

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Timeout.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,5 @@ uint32_t Timeout::time_left_ms(void)
7373
if (time_over()) {
7474
return 0;
7575
}
76-
int32_t ms_left = time_ms_ - (millis() - reset_time_ms_);
77-
return ms_left > 0 ? ms_left : 0;
76+
return time_ms_ - (uint32_t)(millis() - reset_time_ms_);
7877
}

0 commit comments

Comments
 (0)