Classes | Public Member Functions | Private Member Functions | Private Attributes

base::TimeClock Class Reference

System-specific time functions. More...

#include <_src_base_time_clock.hh>

List of all members.

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 TimeClockmsInstance
shptr< ElapsedTimeFunctormElapsedTimeFunctor

Detailed Description

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.


Constructor & Destructor Documentation

base::TimeClock::TimeClock ( void   )  [private]

ctor/dtor.

base::TimeClock::~TimeClock (  )  [private]

Member Function Documentation

base::TimeClock::DEFINE_GetInstance ( TimeClock   ) 
shptr< TimeClock::ElapsedTimeFunctor > base::TimeClock::SelectElapsedTimeFunctor ( void   )  [private]

Member Data Documentation

Convert UNIX time structs to Milliseconds class.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Palomino Flight Simulator documents generated by doxygen 1.7.1 on Tue May 15 2012 22:40:11