summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-11 11:32:22 +0300
committerWolfy-J <[email protected]>2018-06-11 11:32:22 +0300
commitf1e09d869e9a177228aadb6385ad578d2e29f90d (patch)
treefbc6228c4fa314d9379414cd28c20e71316acd5b /state.go
parent2f135b359575cc1625d1461bb6d8e478da8ccf54 (diff)
fixing tests
Diffstat (limited to 'state.go')
-rw-r--r--state.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/state.go b/state.go
index 08f5dee8..61e48231 100644
--- a/state.go
+++ b/state.go
@@ -47,7 +47,7 @@ type state struct {
}
func newState(value int64) *state {
- return &state{value: value, updated: time.Now().Unix()}
+ return &state{value: value, updated: time.Now().UnixNano()}
}
// String returns current state as string.
@@ -91,7 +91,7 @@ func (s *state) NumExecs() int64 {
// change state value (status)
func (s *state) set(value int64) {
atomic.StoreInt64(&s.value, value)
- atomic.StoreInt64(&s.updated, time.Now().Unix())
+ atomic.StoreInt64(&s.updated, time.Now().UnixNano())
}
// register new execution atomically