TimeResult represents a get time result with an error
type TimeResult struct { Time *time.Time Error error }
Timer represents a running timer process
type Timer struct { Stdin io.WriteCloser TimeChan chan TimeResult // contains filtered or unexported fields }
func StartTimer() (*Timer, error)
StartTimer will start a timer process
func (timer *Timer) GetTime() (*time.Time, error)
GetTime will run `time.Now()` in timer
func (timer *Timer) Pid() int
Pid returns the pid of timer
func (timer *Timer) Stop() error
Stop stops the process