time

package
v1.287.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

Module for fx.

Functions

func IsEnabled added in v1.176.0

func IsEnabled(cfg *Config) bool

IsEnabled for time.

func MustParseDuration added in v1.150.0

func MustParseDuration(s string) time.Duration

MustParseDuration for time.

Types

type Config added in v1.176.0

type Config struct {
	Kind    string `yaml:"kind,omitempty" json:"kind,omitempty" toml:"kind,omitempty"`
	Address string `yaml:"address,omitempty" json:"address,omitempty" toml:"address,omitempty"`
}

Config for time.

func (*Config) IsNTP added in v1.179.0

func (c *Config) IsNTP() bool

IsNTP for configuration.

func (*Config) IsNTS added in v1.179.0

func (c *Config) IsNTS() bool

IsNTS for configuration.

type Network added in v1.179.0

type Network interface {
	// Now from the network.
	Now() (time.Time, error)
}

Network for time.

func NewNetwork added in v1.179.0

func NewNetwork(cfg *Config) Network

NewNetwork for time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL