ztime

package
v0.0.0-...-9d1b792 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormattedNow

func FormattedNow() []byte

FormattedNow returns formatted byte time

func GetFormat

func GetFormat() string

func GetLocation

func GetLocation() *time.Location

func IsDaemonRunning

func IsDaemonRunning() bool

func Now

func Now() time.Time

Now returns current time

func Stop

func Stop()

Stop stops stopping time refresh daemon

func UnixNanoNow

func UnixNanoNow() int64

UnixNanoNow returns current unix nano time

func UnixNow

func UnixNow() int64

UnixNow returns current unix time

func UnixUNanoNow

func UnixUNanoNow() uint32

UnixUNanoNow returns current unix nano time

func UnixUNow

func UnixUNow() uint32

UnixUNow returns current unix time

Types

type Fastime

type Fastime interface {
	IsDaemonRunning() bool
	GetFormat() string
	SetFormat(format string) Fastime
	GetLocation() *time.Location
	SetLocation(location *time.Location) Fastime
	Now() time.Time
	Stop()
	UnixNow() int64
	UnixUNow() uint32
	UnixNanoNow() int64
	UnixUNanoNow() uint32
	FormattedNow() []byte
	StartTimerD(ctx context.Context, dur time.Duration) Fastime
}

func New

func New() Fastime

New returns Fastime

func SetFormat

func SetFormat(format string) Fastime

SetFormat replaces time format

func SetLocation

func SetLocation(location *time.Location) Fastime

SetLocation replaces time location

func StartTimerD

func StartTimerD(ctx context.Context, dur time.Duration) Fastime

StartTimerD provides time refresh daemon

Jump to

Keyboard shortcuts

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