Documentation
¶
Index ¶
Constants ¶
View Source
const DATETIME_FMT = "2006/01/02 15:04:05"
View Source
const DATE_FMT = "2006/01/02"
View Source
const (
ErrWrongHumanTimeFormat = errors.Err("wrong human time format")
)
View Source
const TIME_FMT = "15:04:05"
Variables ¶
This section is empty.
Functions ¶
func DateTime ¶
func DateTime() string
DateTime return curremt datetime in format yyyy/mm/dd HH:MM:SS
func NowTimeUnixNano ¶
func NowTimeUnixNano() uint64
NowTimeUnixNano is a wrapper of time.Now().UnixNano()
func ParseHuman ¶
ParseHuman convert human time format to duration. support:
'H': hour, 'M': minute, 'S': second, 'm': millsecond, 'u': microsecond, 'n': nanosecond
func ToHuman ¶
ToHuman convert nano to human time size, insufficient portion will be discarded performs rounding.
support 0-999ns, 0-999us, 0-999ms, 0-Maxs,
func UnixNanoSinceNow ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.