zone

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Nanosecond  Duration = 1
	Microsecond          = 1000 * Nanosecond
	Millisecond          = 1000 * Microsecond
	Second               = 1000 * Millisecond
	Minute               = 60 * Second
	Hour                 = 60 * Minute
)

Variables

This section is empty.

Functions

func After

func After(d Duration) <-chan Time

func Initialize

func Initialize()

func Sleep

func Sleep(d Duration)

func Tick

func Tick(d Duration) <-chan Time

Types

type Duration

type Duration = time.Duration

func ParseDuration

func ParseDuration(s string) (Duration, error)

func Since

func Since(t Time) Duration

func Until

func Until(t Time) Duration

type Location

type Location = time.Location

func GetLocation

func GetLocation() *Location

type Month

type Month = time.Month

type Ticker

type Ticker = time.Ticker

func NewTicker

func NewTicker(d Duration) *Ticker

type Time

type Time = time.Time

func At

func At(t Time) Time

func Date

func Date(year int, month Month, day, hour, min, sec, nsec int) Time

func Now

func Now() Time

func Parse

func Parse(layout string, value string) (Time, error)

func Unix

func Unix(sec int64, nsec int64) Time

type Timer

type Timer = time.Timer

func AfterFunc

func AfterFunc(d Duration, f func()) *Timer

func NewTimer

func NewTimer(d Duration) *Timer

type Weekday

type Weekday = time.Weekday
const (
	Sunday Weekday = iota
	Monday
	Tuesday
	Wednesday
	Thursday
	Friday
	Saturday
)

Jump to

Keyboard shortcuts

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