sDate

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DateSeparator = "."

Functions

func ForLog added in v0.0.4

func ForLog(value any, prec int64) string

func ForWeb added in v0.0.4

func ForWeb(value any, prec int64) string

func FormatD

func FormatD(value any, prec int64) string

func FormatDSep added in v0.2.5

func FormatDSep(value any, prec int64, separator string) string

func NextStop added in v0.0.3

func NextStop(ts, interval int64) int64

NextStop, ts and interval in seconds

func Since added in v0.6.2

func Since(d time.Duration) string

func SleepInterval added in v0.3.3

func SleepInterval(interval_seconds, seconds_after int64)

func Stop added in v0.0.3

func Stop(stop time.Time) bool

func StopInterval added in v0.3.3

func StopInterval(stop_ts, interval_seconds, seconds_after int64) (stop time.Time, execute bool)

func StopTs

func StopTs(stop, periodSeconds, afterSeconds int64) (stopTs time.Time, execute bool)

StopTs, periodSeconds, afterSeconds, estare procesando hasta (2 * afterSeconds) seg antes del siguiente cierre de vela

func ToTime added in v0.0.4

func ToTime(value any) (time.Time, error)

Types

type Ticker added in v0.2.0

type Ticker struct {
	Ts   int64
	Inc  int64
	T    *time.Ticker
	Func TsFunc
}

func NewTicker added in v0.2.0

func NewTicker(inc int64, f TsFunc) *Ticker

func (*Ticker) Start added in v0.2.0

func (t *Ticker) Start(ts int64)

func (*Ticker) Update added in v0.2.0

func (t *Ticker) Update(ts int64)

type TsFunc added in v0.2.2

type TsFunc func(ts int64)

type Waiter

type Waiter struct {
	Group sync.WaitGroup
	// contains filtered or unexported fields
}

func NewWaiter

func NewWaiter(process map[string]int) *Waiter

func (*Waiter) Done

func (w *Waiter) Done(n int, stop bool)

func (*Waiter) Proc

func (w *Waiter) Proc() []string

func (*Waiter) Wait

func (w *Waiter) Wait(timeout time.Duration)

Wait waits for all the processes to finish, with a timeout if specified

Jump to

Keyboard shortcuts

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