timex

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlignTime

func AlignTime(t time.Time, timeUnit time.Duration, roundUp bool) time.Time

AlignTime 将时间对齐到指定的时间单位。 roundUp 为 true 时向上截断,为 false 时向下截断。

func AlignTimeToWindow

func AlignTimeToWindow(t time.Time, size time.Duration) time.Time

AlignTimeToWindow 将时间对齐到窗口的起始时间。

Types

This section is empty.

Jump to

Keyboard shortcuts

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