#include <EventFilter/StorageManager/interface/BaseCounter.h>
Static Public Member Functions | |
static double | getCurrentTime () |
Returns the current time as a double. |
Definition at line 17 of file BaseCounter.h.
double BaseCounter::getCurrentTime | ( | ) | [static] |
Returns the current time as a double.
The value corresponds to the number of seconds since the epoch (including a fractional part good to the microsecond level). A negative value indicates that an error occurred when fetching the time from the operating system.
Definition at line 17 of file BaseCounter.cc.
References StDecayID::status.
Referenced by stor::StorageManager::addMeasurement(), stor::SMProxyServer::addOutMeasurement(), stor::ForeverCounter::addSample(), stor::ConsumerPipe::ConsumerPipe(), stor::SMProxyServer::defaultWebPage(), stor::RollingSampleCounter::dumpData(), stor::RollingIntervalCounter::dumpData(), stor::RateLimiter::dumpData(), stor::SMProxyServer::eventServerWebPage(), stor::StorageManager::eventServerWebPage(), edm::ServiceManager::get_stats(), stor::RateLimiter::getAllowedConsumersFromList(), stor::EventServer::processEvent(), stor::ConsumerPipe::putEvent(), stor::RollingSampleCounter::shuffleBins(), and stor::ConsumerPipe::wantsEvent().
00018 { 00019 double now = -1.0; 00020 struct timeval timeStruct; 00021 int status = gettimeofday(&timeStruct, 0); 00022 if (status == 0) { 00023 now = ((double) timeStruct.tv_sec) + 00024 (((double) timeStruct.tv_usec) / 1000000.0); 00025 } 00026 return now; 00027 }