Re: [AD] use double for al_current_time and al_rest? |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] use double for al_current_time and al_rest?
- From: Elias Pschernig <elias@xxxxxxxxxx>
- Date: Thu, 27 Dec 2007 18:49:15 +0100
On Thu, 2007-12-27 at 18:14 +0100, Andrei Ellman wrote:
>
> Using a floating point value for timers is not a good idea because once
> the exponent gets too large, the precision of the value to al_rest() for
> decreases, and eventually, the current_time value will become so large
> that the amount to rest() for will underflow. While underflow may not
> happen for a long time, if someone wants to al_rest() for a
> high-precision ammount of time, the actual time rested will be inconsistent.
Yes, but as I said, this is very unlikely to be an isse - for a timespan
of 90 days double would stay at nanosecond precision (whereas the
current version already would wrap around the milliseconds at 50 days).
--
Elias Pschernig <elias@xxxxxxxxxx>