https://github.com/xaionaro-go/timeapiio
A Go client to timeapi.io
https://github.com/xaionaro-go/timeapiio
go golang timeapi timeapi-io
Last synced: 4 months ago
JSON representation
A Go client to timeapi.io
- Host: GitHub
- URL: https://github.com/xaionaro-go/timeapiio
- Owner: xaionaro-go
- License: cc0-1.0
- Created: 2024-09-15T20:33:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-15T20:33:21.000Z (over 1 year ago)
- Last Synced: 2025-02-27T04:17:19.297Z (about 1 year ago)
- Topics: go, golang, timeapi, timeapi-io
- Language: Go
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Go client to [https://www.timeapi.io/](https://www.timeapi.io/)
```go
package main
import (
"fmt"
"time"
"github.com/xaionaro-go/timeapiio"
)
func main() {
t, err := timeapiio.Now()
if err != nil {
panic(err)
}
fmt.Printf("the difference between local and remote clock is %v\n", time.Since(t))
}
```
```
xaionaro@void:~/go/src/github.com/xaionaro-go/timeapiio$ go run ./example/main.go
the difference between local and remote clock is 14.386375ms
```