timeofday

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package timeofday samples a wall-clock time within a given day, weighted by a configurable work-hours window. It is the per-commit timestamp layer that sits on top of the per-day plan produced by the schedule package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sample

func Sample(day time.Time, p profile.TimeOfDay, rng *rand.Rand) time.Time

Sample picks a timestamp on day according to p. WorkBias is the probability of landing inside the [WorkStart, WorkEnd) window; otherwise the timestamp falls in the off-hours complement, with the two off-hour segments weighted proportionally to their length.

day's location is preserved on the returned timestamp. Sample assumes p satisfies 0 <= WorkStart <= WorkEnd <= 24 — validated at the CLI layer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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