From 3b7c6f4875aaf14dae6c310c2e8f388e14f5d17a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 17 Dec 2010 03:27:02 +0900 Subject: [PATCH] factor time diff into lastSync --- ankiqt/ui/sync.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ankiqt/ui/sync.py b/ankiqt/ui/sync.py index e433f5732..da1e1bc10 100755 --- a/ankiqt/ui/sync.py +++ b/ankiqt/ui/sync.py @@ -100,8 +100,7 @@ sync was aborted. Please report this error.""") proxy.connect("ankiqt-" + ankiqt.appVersion) self.proxy = proxy # check clock - timediff = abs(proxy.timestamp - time.time()) - if timediff > 300: + if proxy.timediff > 300: self.emit(SIGNAL("syncClockOff"), timediff) raise SyncError(type="clockOff") return self.proxy @@ -192,7 +191,7 @@ sync was aborted. Please report this error.""") client.setServer(proxy) # need to do anything? start = time.time() - if client.prepareSync(): + if client.prepareSync(proxy.timediff): changes = True # summary if not self.conflictResolution and not self.onlyMerge: