Lowercased Timecorrection function
This commit is contained in:
parent
f1c89f0917
commit
3b7ec3d913
2 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ class UiRequestPlugin(object):
|
||||||
float(main.file_server.bytes_sent) / 1024 / 1024
|
float(main.file_server.bytes_sent) / 1024 / 1024
|
||||||
)
|
)
|
||||||
yield "Peerid: %s | " % main.file_server.peer_id
|
yield "Peerid: %s | " % main.file_server.peer_id
|
||||||
yield "Time correction: %.2fs" % main.file_server.getTimeCorrection()
|
yield "Time correction: %.2fs" % main.file_server.getTimecorrection()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import psutil
|
import psutil
|
||||||
|
|
|
@ -312,7 +312,7 @@ class ConnectionServer(object):
|
||||||
def onInternetOffline(self):
|
def onInternetOffline(self):
|
||||||
self.log.info("Internet offline")
|
self.log.info("Internet offline")
|
||||||
|
|
||||||
def getTimeCorrection(self):
|
def getTimecorrection(self):
|
||||||
corrections = sorted([
|
corrections = sorted([
|
||||||
connection.handshake.get("time") - connection.handshake_time + connection.last_ping_delay
|
connection.handshake.get("time") - connection.handshake_time + connection.last_ping_delay
|
||||||
for connection in self.connections
|
for connection in self.connections
|
||||||
|
|
Loading…
Reference in a new issue