[SDL] Milliseconds on the Mac

Mike Powell belar at earthling.net
Sun Apr 30 19:14:09 PDT 2000


>Actually, the docs on Microseconds() on Apple's site say that it 
>merely returns the time in Microseconds since some date in 1904. 
>It's really just a 64-bit int that it returns, but, according to the 
>docs, there was no way to make a 64 bit int, so they broke it into 
>two 32 bit ints in a struct. The hi and lo elements are just the 
>high and low order 32 bits.

You know, I was just reading further through Apple's docs, and found 
that a microsecond 1/1,000,000th of a second, not 1/100th as I had 
thought. That's many times the resolution I need, though taking 300 
microseconds just to find that, as that article Mattias pointed me to 
said, is a bit excessive when trying to write a real time 3D engine 
(300/1,000,000ths of a second may not seem like much, until you 
consider how much it has to do in 33,333/1,000,000ths of a second in 
order to render a complete frame once every 30 seconds, so just 
calling Microseconds() 111 times would eat up the entire time it 
should take to render a frame).

      ,---------------------------------------------------------.
     / _/_/_/    _/_/_/  _/        _/    _/_/   Michael Powell  /
    / _/    _/  _/      _/      _/  _/  _/  _/                 /
   / _/_/_/    _/_/    _/      _/_/_/  _/_/     Aspiring      /
  / _/    _/  _/      _/      _/  _/  _/  _/   Video Game    /
/ _/_/_/    _/_/_/  _/_/_/  _/  _/  _/  _/   Programmer    /
`---------------------------------------------------------'



More information about the SDL mailing list