diff --git a/fairmq/FairMQLogger.cxx b/fairmq/FairMQLogger.cxx index c21414f8..28c6c606 100644 --- a/fairmq/FairMQLogger.cxx +++ b/fairmq/FairMQLogger.cxx @@ -72,3 +72,9 @@ void FairMQLogger::Log(int type, std::string logmsg) std::cout << "[\033[01;36m" << mbstr << fractional_seconds << "\033[0m]" << "[" << type_str << "]" << " " << logmsg << std::endl; } +timestamp_t get_timestamp () +{ + struct timeval now; + gettimeofday (&now, NULL); + return now.tv_usec + (timestamp_t)now.tv_sec * 1000000; +} \ No newline at end of file diff --git a/fairmq/FairMQLogger.h b/fairmq/FairMQLogger.h index c76d125e..1dc44b24 100644 --- a/fairmq/FairMQLogger.h +++ b/fairmq/FairMQLogger.h @@ -32,11 +32,6 @@ class FairMQLogger typedef unsigned long long timestamp_t; -static timestamp_t get_timestamp () -{ - struct timeval now; - gettimeofday (&now, NULL); - return now.tv_usec + (timestamp_t)now.tv_sec * 1000000; -} +timestamp_t get_timestamp (); #endif /* FAIRMQLOGGER_H_ */