On Thu, Sep 18, 2003 at 11:00:05PM +0200, Fredrik (Naranek) Hubinette (Real Build Master) @ Pike (-) developers forum wrote:
time() was implemented this way *because* of the limited float precision. Basically, you are supposed to do this:
It is limited only by default. Frankly, I see no reason why it is not double precision by default...
int mstime() // Time in milliseconds { int t=time(); float off=time(t); return (off * 1000) + (t * 1000); }
This way I've one extra syscall, and interpeted: three float operations, two function calls and two svalues allocation/deallocation (= subject to gc()).
Not a big deal? Well, then again, I see no reason why default float type is not double precision... :)
Regards, /Al