timer

package
v0.0.0-...-5ef1371 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: CC0-1.0 Imports: 2 Imported by: 0

Documentation

Overview

Timer implementations for RlogC

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Increment

func Increment() rlogc.Timer

A pseudo-timer, that increases every time it is called.

func Interval

func Interval(d time.Duration) rlogc.Timer

A monotonic timer that increases in a given interval.

Calls to this function are cheap, because it only fetches a field of a struct that is incremented by a goroutine, that runs in background.

WARNING: this function creates a goroutine, that won't stop! Do only call this a bounded number of times!

func Seconds

func Seconds() rlogc.Timer

A monotonic timer, that increases once every second.

Calls to this function are somewhat expensive, because this function calls

time.Now().Unix()

Types

This section is empty.

Jump to

Keyboard shortcuts

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