Documentation ¶
Index ¶
- Constants
- func Call(timeout time.Duration, task system.Task) (any, error)
- func CurrentMS() int64
- func CurrentS() int64
- func CurrentTime() string
- func DateStringToTime(d string) time.Time
- func DateTimeStringToTime(dt string) time.Time
- func Delay(delay, tick time.Duration, fun func(any) bool, param any, ...)
- func Get24Time(t time.Time) time.Time
- func Get24TimeUnix(t time.Time) int64
- func GetNowDateString() string
- func GetNowString() string
- func GetTimeUnix(t time.Time) int64
- func GetToday24Time() time.Time
- func GetToday24TimeUnix() int64
- func Hours(hours int) time.Duration
- func IsWeekend(t time.Time) bool
- func MillToFormat(msec int64) string
- func Minutes(minutes int) time.Duration
- func NowNano() int64
- func Seconds(seconds int) time.Duration
- func Ticker(tick time.Duration, fun func(any) bool, param any, funcDefer func(any) bool, ...)
- func TimeFormat(t time.Time) string
- func TimeFormatNoLocal(t time.Time) string
- func TimeToDate(t time.Time) string
- func TodayAt(d time.Duration) time.Time
- func TodayLast() time.Time
- func TodayStringToTime(dt string) time.Time
- func UnixToFormat(second int64) string
- type Expire
- func NowExpireWithDuration(duration time.Duration) Expire
- func NowExpireWithHour(hourIn int64) Expire
- func NowExpireWithMillSecond(msec int64) Expire
- func NowExpireWithMinute(minuteIn int64) Expire
- func NowExpireWithSecond(secondIn int64) Expire
- func NowMillExpireWithDuration(duration time.Duration) Expire
Constants ¶
View Source
const FormatWMD = "Mon Jan 2 15:04:05 2006"
View Source
const FormatYMD = "2006-01-02 15:04:05"
Variables ¶
This section is empty.
Functions ¶
func CurrentTime ¶
func CurrentTime() string
func DateStringToTime ¶
DateStringToTime 日期字符串转换成时间 ("2006-01-02" to time.Time)
func DateTimeStringToTime ¶
DateTimeStringToTime 日期+时间字符串转换成时间 ("2006-01-02 15:04:05" to time.Time)
func Delay ¶ added in v0.6.6
func Delay(delay, tick time.Duration, fun func(any) bool, param any, funcDefer func(any) bool, paramDefer any)
Delay 超时调用 Deprecated: please use system.Ctrl
func MillToFormat ¶ added in v1.4.9
func NowNano ¶ added in v1.0.58
func NowNano() int64
NowNano returns the current Unix time in nanoseconds.
func Ticker ¶ added in v0.5.37
func Ticker(tick time.Duration, fun func(any) bool, param any, funcDefer func(any) bool, paramDefer any)
Ticker 定时调用 Deprecated: please use system.Ctrl
func TimeFormat ¶ added in v0.5.37
func TimeFormatNoLocal ¶ added in v0.5.37
TimeFormatNoLocal 时间转换成日期+时间字符串 (time.Time to "2006-01-02 15:04:05")
func TimeToDate ¶
TimeToDate 时间转换成日期字符串 (time.Time to "2006-01-02")
func TodayStringToTime ¶
TodayStringToTime 时间字符串转换成时间 ("15:04:05" to time.Time)
func UnixToFormat ¶ added in v0.5.37
Types ¶
type Expire ¶ added in v0.5.3
func NowExpireWithDuration ¶ added in v0.5.3
NowExpireWithDuration 秒
func NowExpireWithHour ¶ added in v0.5.3
func NowExpireWithMillSecond ¶ added in v1.8.53
func NowExpireWithMinute ¶ added in v0.5.4
func NowExpireWithSecond ¶ added in v0.5.3
func NowMillExpireWithDuration ¶ added in v1.8.53
NowMillExpireWithDuration 豪秒
Click to show internal directories.
Click to hide internal directories.