Skip to content

Commit

Permalink
GODRIVER-1844 finer precision for getSecondsSinceEpoch (#666)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwysiu authored May 13, 2021
1 parent 5f449ba commit 1e246bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mongo/integration/unified/client_entity.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func (c *clientEntity) numberConnectionsCheckedOut() int32 {
}

func getSecondsSinceEpoch() float64 {
return float64(time.Now().Unix())
return float64(time.Now().UnixNano()) / float64(time.Second/time.Nanosecond)
}

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

0 comments on commit 1e246bd

Please sign in to comment.