common

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Microseconds

type Microseconds int64

func Days

func Days(d int64) Microseconds

func Hours

func Hours(h int64) Microseconds

func MaxMicroseconds

func MaxMicroseconds() Microseconds

func Milliseconds

func Milliseconds(s int64) Microseconds

func MinMicroseconds

func MinMicroseconds() Microseconds

func Minutes

func Minutes(m int64) Microseconds

func Seconds

func Seconds(s int64) Microseconds

func (Microseconds) Count

func (ms Microseconds) Count() int64

func (Microseconds) ToSeconds

func (ms Microseconds) ToSeconds() int64

type TimePoint

type TimePoint Microseconds

func FromIsoString

func FromIsoString(s string) (TimePoint, error)

func MaxTimePoint

func MaxTimePoint() TimePoint

func MinTimePoint

func MinTimePoint() TimePoint

func Now

func Now() TimePoint

func (TimePoint) AddUs

func (tp TimePoint) AddUs(m Microseconds) TimePoint

func (TimePoint) MarshalJSON

func (tp TimePoint) MarshalJSON() ([]byte, error)

func (TimePoint) SecSinceEpoch

func (tp TimePoint) SecSinceEpoch() uint32

func (TimePoint) String

func (tp TimePoint) String() string

func (TimePoint) Sub

func (tp TimePoint) Sub(t TimePoint) Microseconds

func (TimePoint) SubTps

func (tp TimePoint) SubTps(t TimePointSec) Microseconds

func (TimePoint) SubUs

func (tp TimePoint) SubUs(m Microseconds) TimePoint

func (TimePoint) TimeSinceEpoch

func (tp TimePoint) TimeSinceEpoch() Microseconds

func (*TimePoint) UnmarshalJSON

func (tp *TimePoint) UnmarshalJSON(data []byte) error

type TimePointSec

type TimePointSec uint32

*

  • A lower resolution time_point accurate only to seconds from 1970

func FromIsoStringSec

func FromIsoStringSec(s string) (TimePointSec, error)

func MaxTimePointSec

func MaxTimePointSec() TimePointSec

func MinTimePointSec

func MinTimePointSec() TimePointSec

func NewTimePointSecTp

func NewTimePointSecTp(t TimePoint) TimePointSec

func (TimePointSec) AddSec

func (tp TimePointSec) AddSec(offset uint32) TimePointSec

func (TimePointSec) AddUs

func (tp TimePointSec) AddUs(m Microseconds) TimePoint

func (TimePointSec) MarshalJSON

func (tp TimePointSec) MarshalJSON() ([]byte, error)

func (TimePointSec) SecSinceEpoch

func (tp TimePointSec) SecSinceEpoch() uint32

func (TimePointSec) String

func (tp TimePointSec) String() string

func (TimePointSec) Sub

func (TimePointSec) SubSec

func (tp TimePointSec) SubSec(offset uint32) TimePointSec

func (TimePointSec) SubUs

func (tp TimePointSec) SubUs(m Microseconds) TimePoint

func (TimePointSec) ToTimePoint

func (tp TimePointSec) ToTimePoint() TimePoint

func (*TimePointSec) UnmarshalJSON

func (tp *TimePointSec) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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