mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-24 23:10:54 +00:00
format the uptime >.>
This commit is contained in:
parent
976a2593eb
commit
3ad59fb47e
2 changed files with 9 additions and 9 deletions
|
@ -14,7 +14,7 @@ type StatsData struct {
|
|||
StatsDataVersion int
|
||||
|
||||
StartTime time.Time
|
||||
Uptime time.Duration
|
||||
Uptime string
|
||||
BuildTime string
|
||||
BuildHash string
|
||||
|
||||
|
@ -103,7 +103,7 @@ func updatePeriodicStats() {
|
|||
cpuUsage.UserTime = pstat.Utime
|
||||
cpuUsage.SysTime = pstat.Stime
|
||||
|
||||
Statistics.CpuUsagePct = 100 * float64(userTicks + sysTicks) / (timeDiff.Seconds() * float64(ticksPerSecond))
|
||||
Statistics.CpuUsagePct = 100 * float64(userTicks+sysTicks) / (timeDiff.Seconds() * float64(ticksPerSecond))
|
||||
Statistics.MemoryRSS = uint64(pstat.Rss * pageSize)
|
||||
Statistics.MemoryPerClient = Statistics.MemoryRSS / Statistics.CurrentClientCount
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ func updatePeriodicStats() {
|
|||
}
|
||||
|
||||
{
|
||||
Statistics.Uptime = nowUpdate.Sub(Statistics.StartTime)
|
||||
Statistics.Uptime = nowUpdate.Sub(Statistics.StartTime).String()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue