summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
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