clock

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package clock provides the clock interface for the application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	// Now returns the current time.
	Now() time.Time
}

Clock the interface for the clock

func New

func New() Clock

New creates a new Clock

type RealClock

type RealClock struct{}

RealClock the real clock

func (*RealClock) Now

func (s *RealClock) Now() time.Time

Now returns the current time.

Directories

Path Synopsis
Package fakeclock provides a fake clock implementation.
Package fakeclock provides a fake clock implementation.

Jump to

Keyboard shortcuts

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