time

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2026 License: MIT Imports: 1 Imported by: 0

README

time

Table of contents

Summary

This package provides time utilities, currently offering a replaceable time provider to simplify time-dependent logic in tests.

Architecture

Dependencies

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProviderFunc

type ProviderFunc func() time.Time

ProviderFunc provides the current time. It can be replaced in tests to control time behaviour.

func (ProviderFunc) Now

func (t ProviderFunc) Now() time.Time

Now returns the current time using the provider. If the provider is nil, time.Now is used.

func (ProviderFunc) Unix added in v0.0.5

func (t ProviderFunc) Unix() int64

Unix returns t as a Unix time, the number of seconds elapsed since January 1, 1970 UTC. The result does not depend on the location associated with t.

Jump to

Keyboard shortcuts

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