time: github.com/golangplus/time Index | Files

package timep

import "github.com/golangplus/time"

Index

Package Files

time.go

Constants

const (
    Day  = 24 * time.Hour
    Week = 7 * Day
)

func SleepUntil Uses

func SleepUntil(t time.Time)

SleepUntil sleeps until the specified time.

func SleepUntilWithCancel Uses

func SleepUntilWithCancel(ctx context.Context, t time.Time) error

SleepUntilWithCancel sleep until a specify time and returns nil, unless the context is cancelled, in which case ctx.Err() is returned.

type NowFunc Uses

type NowFunc func() time.Time

NowFunc has the signature of time.Now().

func PresetNow Uses

func PresetNow(t time.Time) NowFunc

PresetNow Returns a NowFunc which returns the specific time.

Package timep imports 2 packages (graph) and is imported by 6 packages. Updated 2018-05-08. Refresh now. Tools for package owners.