fasttime

package
v1.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FastTime

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

func NewFastTime

func NewFastTime() *FastTime

func Now

func Now() *FastTime

func (*FastTime) Format

func (this *FastTime) Format(layout string) string

func (*FastTime) Round5Hi

func (this *FastTime) Round5Hi() string

func (*FastTime) Unix

func (this *FastTime) Unix() int64

Unix 最快获取时间戳的方式,通常用在不需要特别精确时间戳的场景

func (*FastTime) UnixCell

func (this *FastTime) UnixCell(seconds int) int64

UnixCell 取整并加1

func (*FastTime) UnixFloor

func (this *FastTime) UnixFloor(seconds int) int64

UnixFloor 取整

func (*FastTime) UnixMilli

func (this *FastTime) UnixMilli() int64

UnixMilli 获取时间戳,精确到毫秒

func (*FastTime) UnixMilliString

func (this *FastTime) UnixMilliString() (int64, string)

func (*FastTime) UnixNextMinute

func (this *FastTime) UnixNextMinute() int64

UnixNextMinute 获取下一分钟开始的时间戳

func (*FastTime) Ymd

func (this *FastTime) Ymd() string

Jump to

Keyboard shortcuts

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