Skip to content

Commit 1e246bd

Browse files
authored
GODRIVER-1844 finer precision for getSecondsSinceEpoch (#666)
1 parent 5f449ba commit 1e246bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongo/integration/unified/client_entity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (c *clientEntity) numberConnectionsCheckedOut() int32 {
183183
}
184184

185185
func getSecondsSinceEpoch() float64 {
186-
return float64(time.Now().Unix())
186+
return float64(time.Now().UnixNano()) / float64(time.Second/time.Nanosecond)
187187
}
188188

189189
func (c *clientEntity) processStartedEvent(_ context.Context, evt *event.CommandStartedEvent) {

0 commit comments

Comments
 (0)