sleep

package
Version: v0.0.0-...-923e5ac Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// time only, need to add date
	STAMP1 = "3:04PM"
	STAMP2 = "3:04:05PM"
	STAMP3 = "15:04"
	STAMP4 = "15:04:05"
	STAMP5 = "15:04PM"
	STAMP6 = "15:04:05PM"

	// datentime
	STAMP100 = "2006-01-02 15:04:05"
	STAMP101 = "2006.01.02 15:04:05"
	STAMP102 = "2006.01.02 15:04:05PM"
	STAMP103 = "2006.01.02 15:04PM"
	STAMP104 = "2006.01.02 3:04:05PM"
	STAMP105 = "2006.01.02 3:04:PM"
	STAMP106 = "01-02-2006 15:04:05"
	STAMP107 = "01.02.2006 15:04:05"
	STAMP108 = "01.02.2006 15:04:05PM"
	STAMP109 = "01.02.2006 15:04PM"
	STAMP110 = "01.02.2006 3:04:05PM"
	STAMP111 = "01.02.2006 3:04PM"
	STAMP112 = "Jan _2 2006 15:04:05"
	STAMP113 = "Jan _2 2006 15:04PM"
	STAMP114 = "Jan _2 2006 15:04:05PM"
	STAMP115 = "Jan _2 2006 3:04:05PM"
	STAMP116 = "Jan _2 2006 3:04PM"
)
View Source
const (
	EXIT_INTERRUPTED                 = 20
	EXIT_UNTIL_INVALID               = 21
	EXIT_TIMETRAVEL_NOT_INVENTED_YET = 22
)

Variables

This section is empty.

Functions

func FluxCapacitorMalfunction

func FluxCapacitorMalfunction(past time.Time) error

func ParseUntil

func ParseUntil(unparsed string) (format string, result time.Time, e error)

parse string, give back matching format, and time

func Reset

func Reset()

resets the globally used time.now

func SignalHandler

func SignalHandler(input *Input)

go, catch signals

func Sleep

func Sleep(input *Input) (exitCode uint8)

func Sum

func Sum(durations ...time.Duration) (sum time.Duration)

sum up durations

Types

type Input

type Input struct {
	abstract.Input

	Durations []time.Duration
	Until     time.Time
	// for verbose output
	Format string

	DoUntil bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL