Documentation ¶
Overview ¶
Package time provides a mockable wrapper for time.
Index ¶
- type Impl
- func (*Impl) After(d time.Duration) <-chan time.Time
- func (*Impl) AfterFunc(d time.Duration, f func()) *time.Timer
- func (*Impl) Date(year int, month time.Month, day int, hour int, min int, sec int, nsec int, ...) time.Time
- func (*Impl) FixedZone(name string, offset int) *time.Location
- func (*Impl) LoadLocation(name string) (*time.Location, error)
- func (*Impl) LoadLocationFromTZData(name string, data []byte) (*time.Location, error)
- func (*Impl) NewTicker(d time.Duration) *time.Ticker
- func (*Impl) NewTimer(d time.Duration) *time.Timer
- func (*Impl) Now() time.Time
- func (*Impl) Parse(layout string, value string) (time.Time, error)
- func (*Impl) ParseDuration(s string) (time.Duration, error)
- func (*Impl) ParseInLocation(layout string, value string, loc *time.Location) (time.Time, error)
- func (*Impl) Since(t time.Time) time.Duration
- func (*Impl) Sleep(d time.Duration)
- func (*Impl) Tick(d time.Duration) <-chan time.Time
- func (*Impl) Unix(sec int64, nsec int64) time.Time
- func (*Impl) UnixMicro(usec int64) time.Time
- func (*Impl) UnixMilli(msec int64) time.Time
- func (*Impl) Until(t time.Time) time.Duration
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) LoadLocationFromTZData ¶
func (*Impl) ParseInLocation ¶
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 }
Click to show internal directories.
Click to hide internal directories.