refactored timers and added lastconnect to address database
This commit is contained in:
parent
c933e76c3e
commit
16282d79d3
5 changed files with 73 additions and 41 deletions
|
|
@ -472,6 +472,10 @@ class OnionrUtils:
|
|||
|
||||
sys.stdout.write("\r┣{0}┫ {1}%".format(arrow + spaces, int(round(percent * 100))))
|
||||
sys.stdout.flush()
|
||||
|
||||
def getEpoch():
|
||||
'''returns epoch'''
|
||||
return math.floor(time.time())
|
||||
|
||||
def size(path='.'):
|
||||
'''
|
||||
|
|
@ -497,4 +501,4 @@ def humanSize(num, suffix='B'):
|
|||
if abs(num) < 1024.0:
|
||||
return "%.1f %s%s" % (num, unit, suffix)
|
||||
num /= 1024.0
|
||||
return "%.1f %s%s" % (num, 'Yi', suffix)
|
||||
return "%.1f %s%s" % (num, 'Yi', suffix)
|
||||
Loading…
Add table
Add a link
Reference in a new issue