countdown

package
v0.0.0-...-aab89e7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Countdown

func Countdown(writer io.Writer, sleeper Sleeper)

Countdown counts to given time

Types

type ConfigurableSleeper

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

ConfigurableSleeper struct with duration and sleep

func (*ConfigurableSleeper) Sleep

func (c *ConfigurableSleeper) Sleep()

Sleep waits for given seconds

type DefaultSleeper

type DefaultSleeper struct{}

DefaultSleeper default sleeper

func (*DefaultSleeper) Sleep

func (d *DefaultSleeper) Sleep()

Sleep waits for a second

type Sleeper

type Sleeper interface {
	Sleep()
}

Sleeper interface with Sleep() function

Jump to

Keyboard shortcuts

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