Skip to content

A golang package that helps you run a function intervalically

License

Notifications You must be signed in to change notification settings

Maidomax/setinterval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setinterval

A golang package that helps you run a function intervalically.

It behaves in a similar way to Javascript's setInterval function.

It has two exported functions Sync() and Async()

Both accept a time.Duration, and a function to be called repeatedly. Sync() blocks, and keeps calling the function periodically, while Async() returns a pointer to an Interval which has methods Pause() and Resume(), and does not block.

About

A golang package that helps you run a function intervalically

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages