datetime

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Time

type Time struct {
}

func NewTime

func NewTime() *Time

func (*Time) DateTimeToUnix

func (*Time) DateTimeToUnix(t string) (int64, error)

DateTimeToUnix 日期字符串转时间戳

func (*Time) GetDate

func (*Time) GetDate() string

GetDate 返回年月日

func (*Time) GetTime

func (*Time) GetTime() string

GetTime 返回年月日时分秒

func (*Time) MilliSecondToDateTime

func (*Time) MilliSecondToDateTime(t int64) string

MilliSecondToDateTime 毫秒转日期

func (*Time) RunTime

func (*Time) RunTime(callback func()) time.Duration

RunTime 计算程序运行时间

func (*Time) SleepRange

func (*Time) SleepRange(max, min int)

SleepRange 随机睡眠指定范围毫秒

func (*Time) UnixToDateTime

func (*Time) UnixToDateTime(t int64) string

UnixToDateTime 时间戳转日期

Jump to

Keyboard shortcuts

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