Help us shape the future of Go! Take the 2026 Go Developer Survey

safetime

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package safetime contains a wrapper function for time.Since to deal with negative durations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeSinceSafe

func TimeSinceSafe(t time.Time, logger *log.Entry) (time.Duration, bool)

TimeSinceSafe returns the duration since t. If the duration is negative, returns false to indicate the fact.

Used to workaround a malfunctioning monotonic clock.

Types

This section is empty.

Jump to

Keyboard shortcuts

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