timecontext

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package timecontext renders request-time context matching context/time-context. It samples the current time and zone and reports elapsed time since the previous model-visible message so the model knows the current time and intervening duration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatElapsed

func FormatElapsed(d time.Duration) string

FormatElapsed renders whole seconds using compact d/h/m/s units.

func Render

func Render(now time.Time, loc *time.Location, previous *time.Time) string

Render formats clock context; nil loc uses UTC and nil previous reports unavailable elapsed time.

Types

This section is empty.

Jump to

Keyboard shortcuts

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