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
{
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::seconds sec;
typedef std::chrono::milliseconds msec;
@ -48,7 +48,7 @@ inline static void timeofday(struct timeval* tv)
inline static void systemtimeofday(struct timeval* tv)
{
gettimeofday(tv, nullptr);
// gettimeofday(tv, nullptr);
timeofday<clk>(tv);
}

View file

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