Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/elcuervo/twitcher
Twitcher. The ticker with update
https://github.com/elcuervo/twitcher
Last synced: 30 days ago
JSON representation
Twitcher. The ticker with update
- Host: GitHub
- URL: https://github.com/elcuervo/twitcher
- Owner: elcuervo
- Created: 2014-02-17T03:32:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-02-17T03:34:16.000Z (over 10 years ago)
- Last Synced: 2023-04-10T15:49:01.975Z (over 1 year ago)
- Language: Go
- Size: 113 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Twitcher
It's like a tick but more anoying
```go
twitcher := twitcher.NewTwitcher(time.Seconds * 5)
twitcher.Do(func() {
print("I'm going to be executed every 5 seconds\n")
})
```Update the execution time:
```go
twitcher.Update(time.Hour * 2)
```You can also access the channel without fancy stuff:
```go
for {
<-twitcher.C
}
```