System-specific time functions. More...
#include <_src_base_time_clock.hh>
Classes | |
| class | ElapsedTimeFunctor |
| System-specific. More... | |
Public Member Functions | |
| DEFINE_GetInstance (TimeClock) Milliseconds GetElapsedTime(void) | |
Private Member Functions | |
| TimeClock (void) | |
| ~TimeClock () | |
| CLASS_METHOD shptr < ElapsedTimeFunctor > | SelectElapsedTimeFunctor (void) |
Private Attributes | |
| CLASS_VAR TimeClock * | msInstance |
| shptr< ElapsedTimeFunctor > | mElapsedTimeFunctor |
System-specific time functions.
All we wanted was a C function to read timer ticks. Then that lunatic wrote a dozen design-patterned C++ classes?! :-{
Elapsed time: ------------- This class finds an underlying OS function to measure elapsed time without being affected by possible adjustments to calendar-time. Using hardware counters is preferred. Using calendar-time is a bad alternative because it is vulnerable to clock skew caused by the user setting the time or syncing with a NTP server.
UNIX time functions: -------------------- UNIX has various functions to measure time. None are perfect, none are guaranteed to exist or be implemented properly, and systems have different hardware clocks. So this class is complicated by having to find the best of several possible methods.
| base::TimeClock::TimeClock | ( | void | ) | [private] |
ctor/dtor.
| base::TimeClock::~TimeClock | ( | ) | [private] |
| base::TimeClock::DEFINE_GetInstance | ( | TimeClock | ) |
| shptr< TimeClock::ElapsedTimeFunctor > base::TimeClock::SelectElapsedTimeFunctor | ( | void | ) | [private] |
TimeClock * base::TimeClock::msInstance [private] |
Convert UNIX time structs to Milliseconds class.
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11