Source File
clock.go
Belonging Package
github.com/gotd/td/clock
// Package clock abstracts time source.package clockimport ()// Clock is current time source.type Clock interface {Now() time.TimeTimer(d time.Duration) TimerTicker(d time.Duration) Ticker}// Timer abstracts a single event.type Timer = neo.Timer// StopTimer stops timer and drains timer channel if Stop() returned false.func ( Timer) {if !.Stop() {select {case <-.C():default:}}}// Ticker abstracts a channel that delivers “ticks” of a clock at intervals.type Ticker = neo.Ticker
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |