libcvd
Public Member Functions | List of all members
CVD::cvd_timer Class Reference

Provides the time elapsed in seconds. More...

#include <timer.h>

Public Member Functions

 cvd_timer ()
 Create a timer, and set the start time to be now.
 
double get_time ()
 How many seconds have elapsed since the start time?
 
double conv_ntime (const double &time) const
 Convert current time given as double by correcting for the start time. More...
 
double reset ()
 Sets the start time to the current time.
 

Detailed Description

Provides the time elapsed in seconds.

This predominantly a wrapper for the system call gettimeofday(), but can also provides a convenient way of converting from other time units. In all cases, the time is given relative to the time the class was created, or the last time reset() was called.

Member Function Documentation

◆ conv_ntime()

double CVD::cvd_timer::conv_ntime ( const double &  time) const

Convert current time given as double by correcting for the start time.

Parameters
timecurrent time as double

The documentation for this class was generated from the following files: