package
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: May 20, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Benchmark
NowMicro()
ok github.com/samber/hot 0.182s
goos: darwin
goarch: arm64
pkg: github.com/samber/hot/bench
BenchmarkDevelTime/TimeGo-10 32602948 37.16 ns/op 0 B/op 0 allocs/op
BenchmarkDevelTime/TimeGo-10 32435061 37.34 ns/op 0 B/op 0 allocs/op
BenchmarkDevelTime/TimeGo-10 32238781 36.80 ns/op 0 B/op 0 allocs/op
BenchmarkDevelTime/TimeSyscall-10 74941058 15.93 ns/op 0 B/op 0 allocs/op
BenchmarkDevelTime/TimeSyscall-10 76003882 16.11 ns/op 0 B/op 0 allocs/op
BenchmarkDevelTime/TimeSyscall-10 74914741 15.89 ns/op 0 B/op 0 allocs/op
Documentation
¶
NowMicro returns the current time in microseconds, with microsecond precision.
It is twice faster than time.Now().
NoCopy may be added to structs which must not be copied
after the first use.
See https://golang.org/issues/8005#issuecomment-190753527
for details.
Note that it must not be embedded, due to the Lock and Unlock methods.
Lock is a no-op used by -copylocks checker from `go vet`.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.