times

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package time 时间相关工具.

包括 计时器 ClockStart, ClockCount, ClockStop. Natural、NaturalNano 自然语言时间间隔显示.

Index

Constants

This section is empty.

Variables

View Source
var ErrParseError = errors.New("parse error")

Functions

func Natural

func Natural(d time.Duration) string

Natural 自然语言显示.

func NaturalNano

func NaturalNano(dur time.Duration) string

NaturalNano 自然语言显示精确到纳秒.

func Parse

func Parse(str string) (time.Time, error)

func ParseNumber

func ParseNumber[T constraints.Integer | constraints.Float](num T) time.Time

Types

This section is empty.

Jump to

Keyboard shortcuts

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