4
0
Эх сурвалжийг харах

Change Clock to empty struct in nosql/nosql | truncate > round

- saves space
-
max furman 5 жил өмнө
parent
commit
63ec2e35b0

+ 2 - 2
acme/db/nosql/nosql.go

@@ -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)