An open API service indexing awesome lists of open source software.

https://github.com/dutchcoders/gotimer

Timer library for go. Will call function after timeout.
https://github.com/dutchcoders/gotimer

Last synced: 9 months ago
JSON representation

Timer library for go. Will call function after timeout.

Awesome Lists containing this project

README

          

# gotimer
Timer library for go. Will call function after timeout.

### Example
```
package main

import (
"fmt"
"github.com/dutchcoders/gotimer"
"time"
)

func main() {
var i int = 0

go timer.Interval(func() error {
fmt.Printf("test %d\n", i)
i++
return nil
}, 1000*time.Millisecond)

time.Sleep(100000 * time.Millisecond)
}
```