mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-31 23:29:21 +02:00
faster resync after suspend
This commit is contained in:
parent
7179b13a4f
commit
12d463d83c
1 changed files with 1 additions and 2 deletions
|
@ -33,8 +33,7 @@ void TimeProvider::setDiffToServer(double ms)
|
|||
gettimeofday(&now, NULL);
|
||||
|
||||
/// clear diffBuffer if last update is older than a minute
|
||||
logO << "now: " << now.tv_sec << ", lastSync: " << lastTimeSync << ", diff: " << now.tv_sec - lastTimeSync << "\n";
|
||||
if (!diffBuffer_.empty() && (now.tv_sec > lastTimeSync + 60))
|
||||
if (!diffBuffer_.empty() && (abs(now.tv_sec - lastTimeSync) > 60))
|
||||
{
|
||||
logO << "Last time sync older than a minute. Clearing time buffer\n";
|
||||
diffToServer_ = ms*1000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue