summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-02-20 01:14:57 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-03-02 08:34:12 +0900
commitd5911e2a10d55974da8466cc820beedd36785b63 (patch)
treed5e080f553c797eeae249f18e70a51534da6c145 /server
parenta45bd1f290746c447dac1e127477c4b118691aa1 (diff)
server: use raw data as downtime/uptime instead of duration
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r--server/peer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/peer.go b/server/peer.go
index 07a1288b..da305894 100644
--- a/server/peer.go
+++ b/server/peer.go
@@ -303,11 +303,11 @@ func (peer *Peer) ToApiStruct() *api.Peer {
uptime := int64(0)
if timer.State.Uptime != 0 {
- uptime = int64(time.Now().Sub(time.Unix(timer.State.Uptime, 0)).Seconds())
+ uptime = timer.State.Uptime
}
downtime := int64(0)
if timer.State.Downtime != 0 {
- downtime = int64(time.Now().Sub(time.Unix(timer.State.Downtime, 0)).Seconds())
+ downtime = timer.State.Downtime
}
timerconf := &api.TimersConfig{