Version: v0.0.0-...-e2f90f4 Latest Latest

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

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 0




This section is empty.


This section is empty.


func GetDelta

func GetDelta(start, end time.Time, format time.Duration) float64

GetDelta returns the delta between two time.Time in the time.Duration specified. If time.Duration is not supported, the func will return seconds per default.

func GetDeltaInMillisec

func GetDeltaInMillisec(start, end int64) float64

func GetDeltaInNanos

func GetDeltaInNanos(start, end int64) float64

func GetDeltaInSec

func GetDeltaInSec(start, end int64) float64

func ShortTimeMeasure

func ShortTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{})) func()

WARN: This method is made on purpose all-in-line to avoid useless allocations and resources usage


type TimeMeasure

type TimeMeasure struct {
	// contains filtered or unexported fields

func StartTimeMeasure

func StartTimeMeasure() *TimeMeasure

func (*TimeMeasure) GetDelta

func (t *TimeMeasure) GetDelta() time.Duration

func (*TimeMeasure) GetDeltaInMil

func (t *TimeMeasure) GetDeltaInMil() decimal.Decimal

func (*TimeMeasure) GetDeltaInNanos

func (t *TimeMeasure) GetDeltaInNanos() int64

func (*TimeMeasure) GetDeltaInSec

func (t *TimeMeasure) GetDeltaInSec() decimal.Decimal

func (*TimeMeasure) GetStart

func (t *TimeMeasure) GetStart() time.Time

func (*TimeMeasure) GetStop

func (t *TimeMeasure) GetStop() time.Time

func (*TimeMeasure) StopAndLogTimeMeasure

func (t *TimeMeasure) StopAndLogTimeMeasure(messagePrefix string, loggingFunc func(format string, args ...interface{}))

func (*TimeMeasure) StopTimeMeasure

func (t *TimeMeasure) StopTimeMeasure()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL