mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-20 01:47:36 +02:00
Remove call to gettimeofday
This commit is contained in:
parent
bac33043cf
commit
08902ae0a5
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue