internal

package
v1.43.0-fastdelta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Stopwatch

type Stopwatch struct {
	// contains filtered or unexported fields
}

Stopwatch is used to time code execution.

func NewStopwatch

func NewStopwatch() *Stopwatch

NewStopwatch creates a new stopwatch

func (*Stopwatch) Duration

func (s *Stopwatch) Duration() time.Duration

Duration returns the total duration since this stopwatch began.

func (*Stopwatch) Last

func (s *Stopwatch) Last() time.Time

Last returns the last ticked time.

func (*Stopwatch) LastDuration

func (s *Stopwatch) LastDuration() time.Duration

LastDuration returns the total time since the last ticked time.

func (*Stopwatch) Reset

func (s *Stopwatch) Reset()

Reset zeros a stopwatch back to the current time

func (*Stopwatch) Tick

func (s *Stopwatch) Tick() time.Duration

Tick the stopwatch, saving the current time and returning the duration between now and the last tick. If no tick occured, start time of the stopwatch is used.

Directories

Path Synopsis
Package cmemprof profiles C memory allocations (malloc, calloc, realloc, etc.)
Package cmemprof profiles C memory allocations (malloc, calloc, realloc, etc.)
Package extensions provides an interface for using optional features.
Package extensions provides an interface for using optional features.
Package immutable provides read-only types
Package immutable provides read-only types
Package pprofutils is a fork of github.com/felixge/pprofutils, see README.
Package pprofutils is a fork of github.com/felixge/pprofutils, see README.

Jump to

Keyboard shortcuts

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