Example #1
0
bool Packet::operator<(const Packet &other) const
{
	if (seconds() < other.seconds())
        return true;
	if (seconds() > other.seconds())
        return false;
	if (seconds() == other.seconds() && nanoSeconds() < other.nanoSeconds())
        return true;
    return false;
}
Example #2
0
 uint64_t evaluateCorrection() {
     uint64_t c = 0;
     for (int i = 0; i < 1000; ++i)
     {
         start();
         stop();
         c += nanoSeconds();
     }
     timer::s_correction = c / 1000;
     return timer::s_correction;
 }
Example #3
0
 int32_t TimeBase::NanoSeconds() const
 {
   return nanoSeconds();
 }
Example #4
0
 double  seconds() const {
     return nanoSeconds() * 1e-9;
 }