sippy_time

package
v0.0.0-...-b4a1369 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLOCK_REALTIME  = C.CLOCK_REALTIME
	CLOCK_MONOTONIC = C.CLOCK_MONOTONIC
)

Variables

This section is empty.

Functions

func ClockGettime

func ClockGettime(cid C.clockid_t) (time.Time, error)

func FloatToDuration

func FloatToDuration(v float64) time.Duration

func FloatToTime

func FloatToTime(t float64) time.Time

func RoundTime

func RoundTime(t time.Time) time.Time

func TimeToFloat

func TimeToFloat(t time.Time) float64

Types

type GoroutineCtx

type GoroutineCtx interface {
	Apply(realt, monot time.Time) time.Duration
}

type MonoTime

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

func NewMonoTime

func NewMonoTime() (s *MonoTime, err error)

func NewMonoTime1

func NewMonoTime1(realt time.Time) (*MonoTime, error)

func NewMonoTime2

func NewMonoTime2(monot time.Time, realt time.Time) *MonoTime

func NewMonoTimeFromString

func NewMonoTimeFromString(s string) (*MonoTime, error)

func (*MonoTime) Add

func (s *MonoTime) Add(d time.Duration) *MonoTime

func (*MonoTime) After

func (s *MonoTime) After(t *MonoTime) bool

func (*MonoTime) Before

func (s *MonoTime) Before(t *MonoTime) bool

func (*MonoTime) Fptime

func (s *MonoTime) Fptime() string

func (*MonoTime) Ftime

func (s *MonoTime) Ftime() string

func (*MonoTime) GetOffsetCopy

func (s *MonoTime) GetOffsetCopy(offset time.Duration) *MonoTime

func (*MonoTime) Monot

func (s *MonoTime) Monot() time.Time

func (*MonoTime) OffsetFromNow

func (s *MonoTime) OffsetFromNow() (time.Duration, error)

func (*MonoTime) Realt

func (s *MonoTime) Realt() time.Time

func (*MonoTime) Sub

func (s *MonoTime) Sub(t *MonoTime) time.Duration

Jump to

Keyboard shortcuts

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