safetime

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 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