Documentation
¶
Index ¶
- Constants
- Variables
- func Active()
- func After(d Duration) <-chan Time
- func Scale() float64
- func Set(now Time)
- func SetScale(scale float64)
- func Sleep(d Duration)
- func Start()
- func Step(dt Duration)
- func Stop()
- func Tick(d Duration) <-chan Time
- type Clock
- type Duration
- type Location
- type Month
- type ParseError
- type Ticker
- type Time
- func Date(year int, month Month, day, hour, min, sec, nsec int, loc *Location) Time
- func Now() Time
- func Parse(layout, value string) (Time, error)
- func ParseInLocation(layout, value string, loc *Location) (Time, error)
- func Unix(sec int64, nsec int64) Time
- func UnixMicro(usec int64) Time
- func UnixMilli(msec int64) Time
- type Timer
- type Weekday
Constants ¶
View Source
const ( Nanosecond = realtime.Nanosecond Microsecond = realtime.Microsecond Millisecond = realtime.Millisecond Second = realtime.Second Minute = realtime.Minute Hour = realtime.Hour )
Duration constants
View Source
const ( January = realtime.January February = realtime.February March = realtime.March April = realtime.April May = realtime.May June = realtime.June July = realtime.July August = realtime.August September = realtime.September October = realtime.October November = realtime.November December = realtime.December )
Month constants
View Source
const ( Sunday = realtime.Sunday Monday = realtime.Monday Tuesday = realtime.Tuesday Wednesday = realtime.Wednesday Thursday = realtime.Thursday Friday = realtime.Friday Saturday = realtime.Saturday )
Weekday constants
View Source
const ( Layout = "01/02 03:04:05PM '06 -0700" // The reference realtime, in numerical order. ANSIC = "Mon Jan _2 15:04:05 2006" UnixDate = "Mon Jan _2 15:04:05 MST 2006" RubyDate = "Mon Jan 02 15:04:05 -0700 2006" RFC822 = "02 Jan 06 15:04 MST" RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone RFC850 = "Monday, 02-Jan-06 15:04:05 MST" RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone RFC3339 = "2006-01-02T15:04:05Z07:00" RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00" Kitchen = "3:04PM" // Handy time stamps. Stamp = "Jan _2 15:04:05" StampMilli = "Jan _2 15:04:05.000" StampMicro = "Jan _2 15:04:05.000000" StampNano = "Jan _2 15:04:05.000000000" DateTime = "2006-01-02 15:04:05" DateOnly = "2006-01-02" TimeOnly = "15:04:05" )
Layouts
Variables ¶
View Source
var Local = UTC
View Source
var UTC = realtime.UTC
Location constants
Functions ¶
Types ¶
type Clock ¶
type Clock struct {
*relativetime.Clock[Time, Duration, *realtime.Timer]
// contains filtered or unexported fields
}
Inherits methods from relative clock, falling back to real clock for the rest
func NewClockAt ¶
type Duration ¶
func ParseDuration ¶
type Location ¶
func LoadLocation ¶
type ParseError ¶
type ParseError = realtime.ParseError
Click to show internal directories.
Click to hide internal directories.