time.go 599 B

1234567891011121314151617
  1. // Unless explicitly stated otherwise all files in this repository are licensed
  2. // under the Apache License Version 2.0.
  3. // This product includes software developed at Datadog (https://www.datadoghq.com/).
  4. // Copyright 2016 Datadog, Inc.
  5. //go:build !windows
  6. // +build !windows
  7. package tracer
  8. import "time"
  9. // nowTime returns the current time, as computed by Time.Now().
  10. var nowTime func() time.Time = func() time.Time { return time.Now() }
  11. // now returns the current UNIX time in nanoseconds, as computed by Time.UnixNano().
  12. var now func() int64 = func() int64 { return time.Now().UnixNano() }