clock

package
v0.1.74 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Since

func Since(c Clock) time.Duration

func Until

func Until(c Clock) time.Duration

Types

type Clock

type Clock struct {
	// contains filtered or unexported fields
}

func MustParse

func MustParse(v string) Clock

func New

func New(hour, min, sec int) Clock

func Now

func Now() Clock

func Parse

func Parse(v string) (Clock, error)

func ParseTime

func ParseTime(t time.Time) Clock

func (Clock) Add

func (c Clock) Add(d time.Duration) Clock

func (Clock) After

func (c Clock) After(u Clock) bool

func (Clock) Before

func (c Clock) Before(u Clock) bool

func (Clock) Clock

func (c Clock) Clock() (hour, min, sec int)

func (Clock) Compare

func (c Clock) Compare(u Clock) int

func (Clock) Equal

func (c Clock) Equal(u Clock) bool

func (Clock) Hour

func (c Clock) Hour() int

func (Clock) IsZero

func (c Clock) IsZero() bool

func (Clock) MarshalText

func (c Clock) MarshalText() (text []byte, err error)

func (Clock) Minute

func (c Clock) Minute() int

func (Clock) Second

func (c Clock) Second() int

func (Clock) Seconds

func (c Clock) Seconds() int

func (Clock) Since

func (c Clock) Since(u Clock) time.Duration

func (Clock) String

func (c Clock) String() string

func (Clock) Sub

func (c Clock) Sub(u Clock) time.Duration

func (Clock) Time

func (c Clock) Time() time.Time

func (*Clock) UnmarshalText

func (c *Clock) UnmarshalText(text []byte) error

func (Clock) Until

func (c Clock) Until(u Clock) time.Duration

Jump to

Keyboard shortcuts

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