Skip to content
Snippets Groups Projects
Commit b3bd9b68 authored by benjamin's avatar benjamin
Browse files

improved comments and made NowMs round properly

parent a9f35ca4
Branches
Tags
4 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!408made the cfollower regualrly update the clock skew,!340Project/channels
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2022 xx foundation //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file. //
////////////////////////////////////////////////////////////////////////////////
package cmix
import "time"
// describes a local time object which gets time
// from the local clock in milliseconds
type localTime struct{}
func (localTime) NowMs() int64 {
t := time.Now()
return t.UnixNano() / int64(time.Millisecond)
return (t.UnixNano() + int64(time.Millisecond)/2) / int64(time.Millisecond)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment