00001 00005 #include "EventFilter/StorageManager/interface/BaseCounter.h" 00006 #include <sys/time.h> 00007 #include <iostream> 00008 00009 using namespace stor; 00010 00017 double BaseCounter::getCurrentTime() 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 }