util

package
v0.0.0-...-ea1f8f4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	Notify(title string, text string) error
}

Notifier is an interface to send notifications.

func NewDesktopNotifier

func NewDesktopNotifier() Notifier

NewDesktopNotifier creates a new notifier.

func NewNullNotifier

func NewNullNotifier() Notifier

NewNullNotifier returns a notifier that is silent.

type Timer

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

Timer count time and update the state accordingly.

func NewTimer

func NewTimer(s *state.State, p *painter.Painter, c string, n Notifier) *Timer

NewTimer create a new timer using a state, a command to execute and a painter to draw the screen.

func (*Timer) Run

func (t *Timer) Run()

Run launch a timer and write the counter using the writer.

func (*Timer) Stop

func (t *Timer) Stop()

Stop the timer.

Jump to

Keyboard shortcuts

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