提交 fc187f12 编写于 作者: N Nicolas Hennion

Cherry pick ef643543 to bffeb05e

上级 089cbca7
......@@ -3914,7 +3914,20 @@ class GlancesInstance():
# Update and return current date/hour
self.__update__()
return json.dumps(stats.getNow().strftime(_("%Y-%m-%d %H:%M:%S")))
def __getTimeSinceLastUpdate(self, IOType):
assert(IOType in ['net', 'disk', 'process_disk'])
return getTimeSinceLastUpdate(IOType)
def getNetTimeSinceLastUpdate(self):
return getTimeSinceLastUpdate('net')
def getDiskTimeSinceLastUpdate(self):
return getTimeSinceLastUpdate('net')
def getProcessDiskTimeSinceLastUpdate(self):
return getTimeSinceLastUpdate('process_disk')
class GlancesServer():
"""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册