time

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextDay

func NextDay(hour, minute int) time.Time

NextDayOf now

func NextDayOf

func NextDayOf(from time.Time, hour, minute int) time.Time

This function calculates the time for the next occurrence of the specified hour and minute within a day.

hour is an integer representing the desired hour (0-23). minute is an integer representing the desired minute (0-59). Return A time.Time object representing the date and time for the next occurrence of the specified hour and minute.

func SleepContext added in v0.0.6

func SleepContext(ctx context.Context, duration time.Duration) bool

Sleep until ctx done or timeout return false if ctx is Done

func UntilNextDay added in v0.0.6

func UntilNextDay(hour, minute int) time.Duration

Types

This section is empty.

Jump to

Keyboard shortcuts

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