utils

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(v1, op, v2 string) bool

CompareVersions returns true if the first field and the third field are equal, otherwise false.

func CurrentMicros

func CurrentMicros() int64

CurrentMicros returns the current microseconds.

func CurrentMillis

func CurrentMillis() int64

CurrentMillis returns the current milliseconds.

func NewUuid

func NewUuid() string

NewUuid returns a uuid string.

Types

type ElapsedTimer

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

A ElapsedTimer is a timer to track the elapsed time.

func NewElapsedTimer

func NewElapsedTimer() *ElapsedTimer

NewElapsedTimer returns a ElapsedTimer.

func (*ElapsedTimer) Duration

func (et *ElapsedTimer) Duration() time.Duration

Duration returns the elapsed time.

func (*ElapsedTimer) Elapsed

func (et *ElapsedTimer) Elapsed() string

Elapsed returns the string representation of elapsed time.

func (*ElapsedTimer) ElapsedMs

func (et *ElapsedTimer) ElapsedMs() string

ElapsedMs returns the elapsed time of string on milliseconds.

Jump to

Keyboard shortcuts

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