Quantcast

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
|  
Report Content as Inappropriate

Width of system timer in lua long


Hi,

The elua web site
(http://www.eluaproject.net/doc/v0.9/en_arch_platform_timers.html#the_system_timer)
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.

Cheers,

Mark
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Loading...