async

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

README

Utilities for asynchronous programming (go routines, wait groups, etc.)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Schedule

func Schedule(delay time.Duration, fun ScheduledFunc)

Schedule runs the function after the delay

Types

type ScheduledFunc

type ScheduledFunc func()

type Timestamp added in v0.21.0

type Timestamp struct {
	// contains filtered or unexported fields
}

Timestamp is a thread safe timestamp

func NewAsyncTimestamp added in v0.21.0

func NewAsyncTimestamp(lastTimestamp time.Time) *Timestamp

func (*Timestamp) LastTimestamp added in v0.21.0

func (at *Timestamp) LastTimestamp() time.Time

LastTimestamp returns the last set timestamp

func (*Timestamp) Mark added in v0.21.0

func (at *Timestamp) Mark()

Mark sets the timestamp with the current time

Jump to

Keyboard shortcuts

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