Lib-Pico8
                                
                                
                                
                                    Lib-Pico8 copied to clipboard
                            
                            
                            
                        timer copes with numeric overflow?
Does timer cope with numeric overflow?
No, it doesn't. In fact, time() only goes up to a much smaller number than we originally thought; we thought it would go up to the max 8-bit int, which would overflow at around 9 hours, but it actually overflows at a much smaller value, rolling back to 0 after less than 15 minutes. The timers are going to have to be reworked to use the update callback instead of time() until if/when Zep implements a proper timer API.
@clowerweb is this still an outstanding issue?
p.s. perhaps adding library authors as collaborators would help them to see and respond to issues like this one when they crop up 😄
Do we know that the update callback reliably gets called 30/60/whatever times per second (or at least approaches that ratio at the limit)? My main concern about using the update callback rather than time() would be that the time displayed onscreen might not be accurate over time.
Also now seeing that time() was removed since I wrote this util so it's gonna need some updating anyway. Not sure what the replacement is meant to be.
time() was removed but it's still there and can by used (last time I checked). Deprecated is probably what Zep meant when he wrote that changelog.