mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-29 17:06:18 +02:00
replace gettimeofday with chronos::systemtimeofday
This commit is contained in:
parent
b0f1bee219
commit
5579eabfe0
8 changed files with 27 additions and 12 deletions
|
@ -38,7 +38,7 @@ void TimeProvider::setDiffToServer(double ms)
|
|||
{
|
||||
static int32_t lastTimeSync = 0;
|
||||
timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
chronos::systemtimeofday(&now);
|
||||
|
||||
/// clear diffBuffer if last update is older than a minute
|
||||
if (!diffBuffer_.empty() && (std::abs(now.tv_sec - lastTimeSync) > 60))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue