Remove call to gettimeofday

This commit is contained in:
badaix 2020-02-09 12:22:26 +01:00
parent bac33043cf
commit 08902ae0a5
2 changed files with 3 additions and 3 deletions

View file

@ -30,7 +30,7 @@
namespace chronos namespace chronos
{ {
typedef std::chrono::steady_clock clk; typedef std::chrono::steady_clock clk;
//typedef std::chrono::system_clock clk; // typedef std::chrono::system_clock clk;
typedef std::chrono::time_point<clk> time_point_clk; typedef std::chrono::time_point<clk> time_point_clk;
typedef std::chrono::seconds sec; typedef std::chrono::seconds sec;
typedef std::chrono::milliseconds msec; typedef std::chrono::milliseconds msec;
@ -48,7 +48,7 @@ inline static void timeofday(struct timeval* tv)
inline static void systemtimeofday(struct timeval* tv) inline static void systemtimeofday(struct timeval* tv)
{ {
gettimeofday(tv, nullptr); // gettimeofday(tv, nullptr);
timeofday<clk>(tv); timeofday<clk>(tv);
} }

View file

@ -630,7 +630,7 @@ void StreamServer::onMessageReceived(StreamSession* streamSession, const msg::Ba
timeMsg->latency = timeMsg->received - timeMsg->sent; timeMsg->latency = timeMsg->received - timeMsg->sent;
// LOG(INFO) << "Latency sec: " << timeMsg.latency.sec << ", usec: " << timeMsg.latency.usec << ", refers to: " << timeMsg.refersTo << // LOG(INFO) << "Latency sec: " << timeMsg.latency.sec << ", usec: " << timeMsg.latency.usec << ", refers to: " << timeMsg.refersTo <<
//"\n"; //"\n";
streamSession->sendAsync(timeMsg); streamSession->sendAsync(timeMsg, true);
// refresh streamSession state // refresh streamSession state
ClientInfoPtr client = Config::instance().getClientInfo(streamSession->clientId); ClientInfoPtr client = Config::instance().getClientInfo(streamSession->clientId);