|DSOEXPORT boost::uint64_t||getTicks ()|
|Wall clock timer, returns current POSIX time in milliseconds. |
|DSOEXPORT boost::int32_t||getTimeZoneOffset (double time)|
Wall clock timer, returns current POSIX time in milliseconds.
Win32 implementation for getTicks.
Referenced by gnash::WallClockTimer::elapsed(), gnash::media::gst::SimpleTimer::expired(), resetLastAdvanceTimer(), cygnal::resetLastAdvanceTimer(), gnash::WallClockTimer::restart(), secondsSinceLastAdvance(), and cygnal::secondsSinceLastAdvance().
Returns the offset between actual clock time and UTC. It relies on the system's time zone settings, so cannot be regarded as reliable.
Common non-boost function to return the present time offset. This all seems like a terrible hack. It was moved from Date.cpp, whence the following explanation also comes.
If the real mktime() sees isdst == 0 with a DST date, it sets t_isdst and modifies the hour fields, but we need to set the specified hour in the localtime in force at that time.
To do this we set tm_isdst to the correct value for that moment in time by doing an initial conversion of the time to find out is_dst for that moment without DST, then do the real conversion. This may still get things wrong around the hour when the clocks go back
It also gets things wrong for very high or low time values, when the localtime implementation fills the gmtoff element with 53 minutes (on at least one machine, anyway).