package
module
Version:
v0.0.0-...-b551789
Opens a new window with list of versions in this module.
Published: Aug 14, 2016
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
boomer
Boomer set a count down timer and trigger a function when timeout.
Example
Run the example under directory example
to figure out what this repo can do.
go get github.com/zyfdegh/boomer
git clone https://github.com/zyfdegh/boomer.git
cd boomer/example
go build
./example
[zyfdegh/gotty][https://github.com/zyfdegh/gotty.git]: A forked gotty from [yudai/gotty][https://github.com/yudai/gotty.git].
Documentation
¶
type Boomer struct {
SECONDS_INIT uint64
}
Boomer is a count down timer and can trigger function `f` when timeout.
NewBoomer creates a boomer, time is in seconds. You need to define function f.
Arm let timer count down now.
Rewind count down timer to initial value(defined when you call Arm()).
Unarm cancels timer, the boomer will no longer boom.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.