Commit 17072f33 authored by Kirill Smelkov's avatar Kirill Smelkov

X monotime -> xtime

parent 448231d7
...@@ -17,18 +17,18 @@ ...@@ -17,18 +17,18 @@
// See COPYING file for full licensing terms. // See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options. // See https://www.nexedi.com/licensing for rationale and options.
package neo // Package xtime complements standard package time.
// time related utilities package xtime
import ( import (
"time" "time"
) )
// monotime returns time passed since program start // Mono returns time passed since program start.
// it uses monothonic time for measurments and is robust to OS clock adjustments // It uses monothonic time for measurments and is robust to OS clock adjustments
// //
// XXX better return time.Duration? // XXX better return time.Duration?
func monotime() float64 { func Mono() float64 {
// time.Sub uses monotonic clock readings for the difference // time.Sub uses monotonic clock readings for the difference
return time.Now().Sub(tstart).Seconds() return time.Now().Sub(tstart).Seconds()
} }
......
...@@ -31,6 +31,7 @@ import ( ...@@ -31,6 +31,7 @@ import (
"lab.nexedi.com/kirr/go123/xnet" "lab.nexedi.com/kirr/go123/xnet"
"lab.nexedi.com/kirr/neo/go/neo/internal/xtime"
"lab.nexedi.com/kirr/neo/go/neo/neonet" "lab.nexedi.com/kirr/neo/go/neo/neonet"
"lab.nexedi.com/kirr/neo/go/neo/proto" "lab.nexedi.com/kirr/neo/go/neo/proto"
"lab.nexedi.com/kirr/neo/go/neo/xneo" "lab.nexedi.com/kirr/neo/go/neo/xneo"
...@@ -82,7 +83,7 @@ func NewMaster(clusterName string, net xnet.Networker) *Master { ...@@ -82,7 +83,7 @@ func NewMaster(clusterName string, net xnet.Networker) *Master {
nodeCome: make(chan nodeCome), nodeCome: make(chan nodeCome),
// nodeLeave: make(chan nodeLeave), // nodeLeave: make(chan nodeLeave),
monotime: monotime, monotime: xtime.Mono,
} }
return m return m
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment