No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
.gitignore
.travis.yml
LICENSE
README.md
sleeper.go
sleeper_test.go

README.md

sleeper

Build Status Coverage Status GoDoc

sleeperhold

What is this

this is a library for tick-tack processes using time.Tick

Install

go get -u github.com/deadcheat/sleeper

Example

package main

import (
	"fmt"
	"time"

	"github.com/deadcheat/sleeper"
)

func main() {
	s := sleeper.New(3*time.Second, func() error {
		fmt.Println("output to std")
		return nil
	})
	_ = s.Start()
	s.Wait()
}