mirror of
https://github.com/snowykami/server-status-client.git
synced 2024-11-22 23:27:45 +08:00
✨ 添加系统启动时间
This commit is contained in:
parent
2c3cda6e46
commit
3d14b5a18e
@ -136,6 +136,7 @@ class Client:
|
|||||||
self.link = link
|
self.link = link
|
||||||
self.interval = interval
|
self.interval = interval
|
||||||
|
|
||||||
|
self.start_time = int(time.clock())
|
||||||
self.hardware = Hardware()
|
self.hardware = Hardware()
|
||||||
|
|
||||||
log("Client initialized",
|
log("Client initialized",
|
||||||
@ -187,6 +188,7 @@ class Client:
|
|||||||
"labels": self.labels,
|
"labels": self.labels,
|
||||||
"location": self.location,
|
"location": self.location,
|
||||||
"uptime": int(time.time() - self.start_time),
|
"uptime": int(time.time() - self.start_time),
|
||||||
|
"start_time": self.start_time, # 系统启动的时间
|
||||||
"link": self.link,
|
"link": self.link,
|
||||||
"observed_at": int(time.time()),
|
"observed_at": int(time.time()),
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user