internal

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 1 Imported by: 0

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NowMicro

func NowMicro() int64

NowMicro returns the current time in microseconds, with microsecond precision. It is twice faster than time.Now().

Types

type NoCopy added in v0.2.0

type NoCopy struct{}

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.

func (*NoCopy) Lock added in v0.2.0

func (*NoCopy) Lock()

Lock is a no-op used by -copylocks checker from `go vet`.

func (*NoCopy) Unlock added in v0.2.0

func (*NoCopy) Unlock()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL