measure

package
v0.24.6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: AGPL-3.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
}

func NewStopwatch

func NewStopwatch() *Stopwatch

NewStopwatch creates a stopwatch that simply holds starting time. The idea behind its usage is to have its String() function redirect to the function that measures elapsed time since its creation in order to plug it into defered logger calls.

func (*Stopwatch) Measure

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

func (*Stopwatch) Start

func (s *Stopwatch) Start()

func (*Stopwatch) String

func (s *Stopwatch) String() string

Jump to

Keyboard shortcuts

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