time

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyPtr

func CopyPtr(t *time.Time) *time.Time

func DifferenceStr added in v0.13.0

func DifferenceStr(t1 *time.Time, t2 *time.Time) string

func GetCurrentUTCDate added in v0.35.0

func GetCurrentUTCDate() time.Time

func LocalHourNow

func LocalHourNow() string

func LocalTimestamp

func LocalTimestamp(t *time.Time) string

func LocalTimestampHuman

func LocalTimestampHuman(t *time.Time) string

func MaxDuration added in v0.14.0

func MaxDuration(duration time.Duration, durations ...time.Duration) time.Duration

func MicrosecsStr

func MicrosecsStr(t time.Time) string

func MillisToTime added in v0.8.0

func MillisToTime(epochMillis int64) time.Time

func MillisecsStr

func MillisecsStr(t time.Time) string

func MustParseDuration added in v0.14.0

func MustParseDuration(str string) time.Duration

func PtrsEqual

func PtrsEqual(t1 *time.Time, t2 *time.Time) bool

func SinceStr added in v0.13.0

func SinceStr(t *time.Time) string

func Timestamp

func Timestamp(t time.Time) string

func ToMillis added in v0.8.0

func ToMillis(t time.Time) int64

Types

type Timer added in v0.12.0

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

func StartTimer added in v0.12.0

func StartTimer(names ...string) Timer

func (*Timer) Print added in v0.13.0

func (t *Timer) Print(messages ...string)

Jump to

Keyboard shortcuts

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