2019-05-31 00:43:23 +01:00
|
|
|
// Package local provides a local clock
|
|
|
|
package local
|
|
|
|
|
|
|
|
import (
|
|
|
|
gotime "time"
|
|
|
|
|
2020-01-30 14:39:00 +03:00
|
|
|
"github.com/micro/go-micro/v2/sync/time"
|
2019-05-31 00:43:23 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
type Time struct{}
|
|
|
|
|
|
|
|
func (t *Time) Now() (gotime.Time, error) {
|
|
|
|
return gotime.Now(), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewTime(opts ...time.Option) time.Time {
|
|
|
|
return new(Time)
|
|
|
|
}
|