timehelper

package
v0.0.0-...-b952f1b Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentDay

func CurrentDay() time.Time

CurrentDay 当前天

func CurrentHour

func CurrentHour() time.Time

CurrentHour 当前小时

func CurrentMonth

func CurrentMonth() time.Time

CurrentMonth 当前月

func CurrentWeek

func CurrentWeek() time.Time

CurrentWeek 当前周

func NextDay

func NextDay() time.Time

NextDay 下一天

func NextHour

func NextHour() time.Time

NextHour 下个小时开始时间

func NextMonth

func NextMonth() time.Time

NextMonth 下个月开始时间

func NextWeek

func NextWeek() time.Time

NextWeek 下周开始时间

func ServerNow

func ServerNow() time.Time

func ServerNowMicro

func ServerNowMicro() int64

ServerNowMicro 获取时间戳(微秒)

func ServerNowMilli

func ServerNowMilli() int64

ServerNowMilli 获取时间戳(毫秒)

func ServerNowSeconds

func ServerNowSeconds() int64

ServerNowSeconds 获取时间戳(秒)

Types

type Timer

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

func NewTicker

func NewTicker(d time.Duration) *Timer

func (*Timer) C

func (t *Timer) C() <-chan time.Time

func (*Timer) Reset

func (t *Timer) Reset(d time.Duration)

func (*Timer) Stop

func (t *Timer) Stop()

Jump to

Keyboard shortcuts

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