[Gambas-user] Timer question

Benoit Minisini gambas at ...1...
Tue Mar 29 10:54:16 CEST 2005


On Sunday 27 March 2005 17:35, Laurent Carlier wrote:
> Le Dimanche 27 Mars 2005 17:16, Lance Beck a écrit :
> > Hi,
> > I have a program that uses "Timer".  I understand that it shows the
> > elapsed seconds from program start (unlike VB).  If my program runs
> > continuously, when will it overflow?
> > Thanks,
> > Lance
>
> I guess it's store as a 32 bit value so it should restart to 0 after
> &hFFFFFFFF seconds -> 4294967295 seconds !
>
> Something like 136 years .....

The Timer() function is based on the gettimeofday() glibc function, that 
returns the number of seconds elapsed since 1/1/1970 as a 4 bytes signed 
integer! So there will be a problem in 2038. Stay tune for the 2038 bug ;-)

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list