Commit Graph

1 Commits

Author SHA1 Message Date
William Casarin
2f54a05705 timecache: add timecache help for timed caches
Some things we definitely don't want to generate every frame, such as
relative-time formatted strings, as that would create a heap allocation
each frame.

Introduce TimeCached<T> which is responsible for updating some state
after some expiry.

Signed-off-by: William Casarin <jb55@jb55.com>
2024-02-15 13:07:01 -08:00