An open API service indexing awesome lists of open source software.

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

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
```