clock

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package clock provides indirection for accessing current wall clock time. this is suitable for timestamps and long-term time operations, not short-term time measurements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Now

func Now() time.Time

Now returns current wall clock time.

func SleepInterruptibly added in v0.10.2

func SleepInterruptibly(ctx context.Context, dur time.Duration) bool

SleepInterruptibly sleeps for the given amount of time, while also honoring cancellation signal. Returns false if canceled, true if slept for the entire duration.

Types

This section is empty.

Jump to

Keyboard shortcuts

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