Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

koron-go/uneventicker

GoDoc Actions/Go CircleCI

Ticker with uneven durations.

Getting started

This fires every 100msec.

t := uneventicker.New(100*time.Millisecond)
for {
    println(<-t.C)
}

This fires after 50msec at first, then fires every 100msec.

t := uneventicker.New(50*time.Millisecond, 100*time.Millisecond)
for {
    println(<-t.C)
}

This fires after 50msec at first, then after 200msec at second, then fires every 75msec.

t := uneventicker.New(50*time.Millisecond, 200*time.Millisecond, 75*time.Millisecond)
for {
    println(<-t.C)
}

About

Ticker fires uneven durations

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages