Popularity
0.4
Stable
Activity
1.6
Declining
2
1
0
Programming language: Go
License: BSD 3-clause "New" or "Revised" License
Tags:
Utilities
tik alternatives and similar packages
Based on the "Utilities" category.
Alternatively, view tik alternatives based on common mentions on social networks and blogs.
-
xlsx
Library to simplify reading the XML format used by recent version of Microsoft Excel in Go programs. -
goreporter
A Golang tool that does static analysis, unit testing, code review and generate code quality report. -
go-funk
A modern Go utility library which provides helpers (map, find, contains, filter, chunk, reverse, ...) -
mergo
A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. -
beaver
Beaver is a real-time messaging server. With beaver you can easily build scalable in-app notifications, realtime graphs, multiplayer games, chat applications, geotracking and more in web applications and mobile apps. -
httpcontrol
Package httpcontrol allows for HTTP transport level control around timeouts and retries.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of tik or a related project?
Popular Comparisons
README
tik
hierarchical timing wheel made easy
simplified version of timeout in Golang
for documentation, view the [API reference](./doc.md)
Install
go get github.com/andy2046/tik
Usage
package main
import (
"sync"
"time"
"github.com/andy2046/tik"
)
func main() {
var l sync.RWMutex
// init a new instance
tk := tik.New()
i := 0
cb := func() {
l.Lock()
i++
l.Unlock()
}
// schedule to run cb in 500ms
to := tk.Schedule(500, cb)
if !to.Pending() {
panic("it should be pending")
}
if to.Expired() {
panic("it should NOT be expired")
}
for {
time.Sleep(100 * time.Millisecond)
if tk.AnyPending() {
continue
}
if tk.AnyExpired() {
continue
}
break
}
l.RLock()
defer l.RUnlock()
if i != 1 {
panic("fail to callback", i)
}
}
*Note that all licence references and agreements mentioned in the tik README section above
are relevant to that project's source code only.