Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
17072f33
Commit
17072f33
authored
Jan 20, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X monotime -> xtime
parent
448231d7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
go/neo/internal/xtime/xtime.go
go/neo/internal/xtime/xtime.go
+5
-5
go/neo/master.go
go/neo/master.go
+2
-1
No files found.
go/neo/time.go
→
go/neo/
internal/xtime/x
time.go
View file @
17072f33
...
...
@@ -17,18 +17,18 @@
// See COPYING file for full licensing terms.
// See https://www.nexedi.com/licensing for rationale and options.
package
neo
// time related utilities
// Package xtime complements standard package time.
package
xtime
import
(
"time"
)
//
monotime returns time passed since program start
//
i
t uses monothonic time for measurments and is robust to OS clock adjustments
//
Mono returns time passed since program start.
//
I
t uses monothonic time for measurments and is robust to OS clock adjustments
//
// XXX better return time.Duration?
func
monotime
()
float64
{
func
Mono
()
float64
{
// time.Sub uses monotonic clock readings for the difference
return
time
.
Now
()
.
Sub
(
tstart
)
.
Seconds
()
}
...
...
go/neo/master.go
View file @
17072f33
...
...
@@ -31,6 +31,7 @@ import (
"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/proto"
"lab.nexedi.com/kirr/neo/go/neo/xneo"
...
...
@@ -82,7 +83,7 @@ func NewMaster(clusterName string, net xnet.Networker) *Master {
nodeCome
:
make
(
chan
nodeCome
),
// nodeLeave: make(chan nodeLeave),
monotime
:
monotime
,
monotime
:
xtime
.
Mono
,
}
return
m
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment