Skip to content

Commit d09b6b9

Browse files
committed
esp8266/modpybrtc: Use 64-bit arithmetic when computing alarm expiry.
1 parent 78bc31e commit d09b6b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

esp8266/modpybrtc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ STATIC mp_obj_t pyb_rtc_alarm(mp_obj_t self_in, mp_obj_t alarm_id, mp_obj_t time
212212
}
213213

214214
// set expiry time (in microseconds)
215-
pyb_rtc_alarm0_expiry = pyb_rtc_get_us_since_2000() + mp_obj_get_int(time_in) * 1000;
215+
pyb_rtc_alarm0_expiry = pyb_rtc_get_us_since_2000() + (uint64_t)mp_obj_get_int(time_in) * 1000;
216216

217217
return mp_const_none;
218218

0 commit comments

Comments
 (0)