Width of system timer in lua long

classic Classic list List threaded Threaded
1 message Options
Mark Burton Mark Burton
Reply | Threaded
Open this post in threaded view

Width of system timer in lua long


The elua web site
says this:

if eLua is compiled in 32 bit integer-only mode (lualong) the counter
is 32 bits wide. It will overflow after about one hour.

But inc/platform.h says this:

// Maximum values of the system timer
#define PLATFORM_TIMER_SYS_MAX                ( ( 1LL << 31 ) - 2 )

Surely that should be ( ( 1LL << 32 ) - 2 ) because at the moment it
overflows around 2147 seconds.


eLua-dev mailing list
[hidden email]