MCPcopy Create free account
hub / github.com/dispatchrun/wzprof / TimeFunc

Function TimeFunc

cpu.go:48–50  ·  view source on GitHub ↗

TimeFunc configures the time function used by the CPU profiler to collect monotonic timestamps. By default, the system's monotonic time is used.

(time func() int64)

Source from the content-addressed store, hash-verified

46//
47// By default, the system's monotonic time is used.
48func TimeFunc(time func() int64) CPUProfilerOption {
49 return func(p *CPUProfiler) { p.time = time }
50}
51
52type cpuTimeFrame struct {
53 start int64

Callers 1

TestCPUProfilerTimeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestCPUProfilerTimeFunction · 0.68