Documentation
¶
Overview ¶
Package clock wraps clock sources.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewNTP ¶
NewNTP creates new NTP clock.
Example ¶
package main
import (
"log"
"github.com/gotd/contrib/clock"
"github.com/gotd/td/telegram"
)
func main() {
c, err := clock.NewNTP() // or clock.NewNTP("my.ntp.host")
if err != nil {
log.Fatal(err)
}
client, err := telegram.ClientFromEnvironment(telegram.Options{
Clock: c,
})
if err != nil {
log.Fatal(err)
}
_ = client
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.