timer

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeResult

type TimeResult struct {
	Time  *time.Time
	Error error
}

TimeResult represents a get time result with an error

type Timer

type Timer struct {
	Stdin    io.WriteCloser
	TimeChan chan TimeResult
	// contains filtered or unexported fields
}

Timer represents a running timer process

func StartTimer

func StartTimer() (*Timer, error)

StartTimer will start a timer process

func (*Timer) GetTime

func (timer *Timer) GetTime() (*time.Time, error)

GetTime will run `time.Now()` in timer

func (*Timer) Pid

func (timer *Timer) Pid() int

Pid returns the pid of timer

func (*Timer) Stop

func (timer *Timer) Stop() error

Stop stops the process

Jump to

Keyboard shortcuts

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