cooldown

package
v0.2.30 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(profile, action string, cooldownSeconds int) bool

Check returns true if the given profile/action is still within its cooldown window. A missing or unreadable state file is treated as "not on cooldown" (fail-open).

func Record

func Record(profile, action string)

Record writes the current timestamp for the given profile/action. Errors are printed to stderr but never fatal (best-effort).

Types

This section is empty.

Jump to

Keyboard shortcuts

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