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/td/telegram" "github.com/t2bot/gotd-contrib/clock" ) 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 }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.