Change Clock to empty struct in nosql/nosql | truncate > round
- saves space -
This commit is contained in:
parent
672e3f976e
commit
63ec2e35b0
1 changed files with 2 additions and 2 deletions
|
@ -86,11 +86,11 @@ func randID() (val string, err error) {
|
|||
}
|
||||
|
||||
// Clock that returns time in UTC rounded to seconds.
|
||||
type Clock int
|
||||
type Clock struct{}
|
||||
|
||||
// Now returns the UTC time rounded to seconds.
|
||||
func (c *Clock) Now() time.Time {
|
||||
return time.Now().UTC().Round(time.Second)
|
||||
return time.Now().UTC().Truncate(time.Second)
|
||||
}
|
||||
|
||||
var clock = new(Clock)
|
||||
|
|
Loading…
Reference in a new issue