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)
| 46 | // |
| 47 | // By default, the system's monotonic time is used. |
| 48 | func TimeFunc(time func() int64) CPUProfilerOption { |
| 49 | return func(p *CPUProfiler) { p.time = time } |
| 50 | } |
| 51 | |
| 52 | type cpuTimeFrame struct { |
| 53 | start int64 |
no outgoing calls