All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Brief description of class still missing. More...
#include <Chrono.h>
Public Member Functions | |
| Chrono () | |
| double | elapsed () |
| void | start () |
Brief description of class still missing.
Full description of class still missing
{
clock_gettime(CLOCK_REALTIME, &_t);
}
| double GpCoreTools::Chrono::elapsed | ( | ) |
Returns the number of seconds elapsed since last start(). If start() was not called, it returns the number of seconds since construction of this object.
Referenced by Flowmeter::addPacket(), PeerInfo::lastBeaconDelay(), Flowmeter::stopGlobal(), and Flowmeter::stopSend().
{
timespec t;
clock_gettime(CLOCK_REALTIME, &t);
return (double)(t.tv_sec-_t.tv_sec)+(double)(t.tv_nsec-_t.tv_nsec)*1e-9;
}
| void GpCoreTools::Chrono::start | ( | ) |
Referenced by Flowmeter::addPacket(), PeerInfo::beaconReceived(), Flowmeter::startGlobal(), and Flowmeter::startSend().
{
clock_gettime(CLOCK_REALTIME, &_t);
}