5 #ifndef ossimTimer_HEADER 6 #define ossimTimer_HEADER 1 33 inline double time_s()
const {
return delta_s(m_startTick, tick()); }
36 inline double time_m()
const {
return delta_m(m_startTick, tick()); }
39 inline double time_u()
const {
return delta_u(m_startTick, tick()); }
42 inline double time_n()
const {
return delta_n(m_startTick, tick()); }
46 inline double delta_s(
Timer_t t1)
const {
return (
double)(tick() - t1)*m_secsPerTick; }
void setStartTick()
Set the start.
unsigned long long Timer_t
double delta_m(Timer_t t1, Timer_t t2) const
Get the time in milliseconds between timer ticks t1 and t2.
double delta_u(Timer_t t1) const
double delta_m(Timer_t t1) const
double time_m() const
Get elapsed time in milliseconds.
double getSecondsPerTick() const
Get the the number of seconds per tick.
void setStartTick(Timer_t t)
Timer_t getStartTick() const
double time_s() const
Get elapsed time in seconds.
Timer class is used for measuring elapsed time or time between two points.
double time_u() const
Get elapsed time in micoseconds.
double time_n() const
Get elapsed time in nanoseconds.
double delta_u(Timer_t t1, Timer_t t2) const
Get the time in microseconds between timer ticks t1 and t2.
double delta_n(Timer_t t1, Timer_t t2) const
Get the time in nanoseconds between timer ticks t1 and t2.
static ossimTimer * m_instance
double delta_s(Timer_t t1) const
double delta_s(Timer_t t1, Timer_t t2) const
Get the time in seconds between timer ticks t1 and t2.
double delta_n(Timer_t t1) const