20 #include <coil/Time.h> 22 #include <coil/TimeMeasure.h> 28 #define ULLONG_MAX 0xffffffffffffffffULL 42 : m_begin(0.0), m_interval(0.0),
43 m_count(0), m_countMax(buflen + 1),
132 double &min_interval,
133 double &mean_interval,
136 max_interval = (double)0;
141 unsigned long int len(
count());
143 if (len == 0)
return false;
145 for (
unsigned long int i(0); i < len; ++i)
149 sq_sum += trecord * trecord;
151 if (trecord > max_interval) max_interval = trecord;
152 if (trecord < min_interval) min_interval = trecord;
155 mean_interval = sum / len;
156 stddev = sqrt(sq_sum / len - (mean_interval * mean_interval));
Structure for time statistics.
long int sec() const
Get value of second time scale.
coil::TimeValue & interval()
Get a interval time.
Statistics getStatistics()
Get statistics result.
void tack()
Finish time measurement for time statistics.
int gettimeofday(struct timeval *tv, struct timezone *tz)
Get the time and timezone.
const unsigned long int m_countMax
coil::TimeValue m_interval
void reset()
Initialize for statistics related data.
unsigned long int m_count
void tick()
Begin time measurement for time statistics.
TimeMeasure(int buflen=100)
Constructor.
unsigned long int count() const
Get number of time measurement buffer.
std::vector< coil::TimeValue > m_record
Common Object Interface Layer.