chrono

package
Version: v0.0.0-...-ced5e47 Latest Latest
Warning

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

Go to latest
Published: May 29, 2021 License: ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTime

func GetTime(d int64) int64

GetTime returns the current TimeNow time in unix epoc.

Types

type TimeNow

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

TimeNow is a unix epoch time structure that is updated in 1 second intervals.

func NewTimeNow

func NewTimeNow() *TimeNow

NewTimeNow returns a new TimeNow struct

func (*TimeNow) Get

func (t *TimeNow) Get() int64

Get returns the current time value as unix epoc.

func (*TimeNow) Update

func (t *TimeNow) Update()

Update forces an update to the current time.

type TimeNowString

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

TimeNowString is a formatted utc time string that is updated in 1 second intervals.

func NewTimeNowString

func NewTimeNowString(format string) *TimeNowString

NewTimeNowString returns a new TimeNowString struct

func (*TimeNowString) String

func (t *TimeNowString) String() string

String fulfills the stringer interface. returns the current time value as a string

func (*TimeNowString) Update

func (t *TimeNowString) Update()

Update forces an update to the current time.

Source Files

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