time

package
v0.0.0-...-fab57c2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package time provides a mockable wrapper for time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct{}

func (*Impl) After

func (*Impl) After(d time.Duration) <-chan time.Time

func (*Impl) AfterFunc

func (*Impl) AfterFunc(d time.Duration, f func()) *time.Timer

func (*Impl) Date

func (*Impl) Date(year int, month time.Month, day int, hour int, min int, sec int, nsec int, loc *time.Location) time.Time

func (*Impl) FixedZone

func (*Impl) FixedZone(name string, offset int) *time.Location

func (*Impl) LoadLocation

func (*Impl) LoadLocation(name string) (*time.Location, error)

func (*Impl) LoadLocationFromTZData

func (*Impl) LoadLocationFromTZData(name string, data []byte) (*time.Location, error)

func (*Impl) NewTicker

func (*Impl) NewTicker(d time.Duration) *time.Ticker

func (*Impl) NewTimer

func (*Impl) NewTimer(d time.Duration) *time.Timer

func (*Impl) Now

func (*Impl) Now() time.Time

func (*Impl) Parse

func (*Impl) Parse(layout string, value string) (time.Time, error)

func (*Impl) ParseDuration

func (*Impl) ParseDuration(s string) (time.Duration, error)

func (*Impl) ParseInLocation

func (*Impl) ParseInLocation(layout string, value string, loc *time.Location) (time.Time, error)

func (*Impl) Since

func (*Impl) Since(t time.Time) time.Duration

func (*Impl) Sleep

func (*Impl) Sleep(d time.Duration)

func (*Impl) Tick

func (*Impl) Tick(d time.Duration) <-chan time.Time

func (*Impl) Unix

func (*Impl) Unix(sec int64, nsec int64) time.Time

func (*Impl) UnixMicro

func (*Impl) UnixMicro(usec int64) time.Time

func (*Impl) UnixMilli

func (*Impl) UnixMilli(msec int64) time.Time

func (*Impl) Until

func (*Impl) Until(t time.Time) time.Duration

type Interface

type Interface interface {
	After(d time.Duration) <-chan time.Time
	AfterFunc(d time.Duration, f func()) *time.Timer
	Date(year int, month time.Month, day int, hour int, min int, sec int, nsec int, loc *time.Location) time.Time
	FixedZone(name string, offset int) *time.Location
	LoadLocation(name string) (*time.Location, error)
	LoadLocationFromTZData(name string, data []byte) (*time.Location, error)
	NewTicker(d time.Duration) *time.Ticker
	NewTimer(d time.Duration) *time.Timer
	Now() time.Time
	Parse(layout string, value string) (time.Time, error)
	ParseDuration(s string) (time.Duration, error)
	ParseInLocation(layout string, value string, loc *time.Location) (time.Time, error)
	Since(t time.Time) time.Duration
	Sleep(d time.Duration)
	Tick(d time.Duration) <-chan time.Time
	Unix(sec int64, nsec int64) time.Time
	UnixMicro(usec int64) time.Time
	UnixMilli(msec int64) time.Time
	Until(t time.Time) time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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