Expand description
Tools for working with time.
Structs§
- Period
- A period of time, in seconds. The beginning is guaranteed to be less
than the end, and all times are positive. This is lightweight
structure which implements
Copy
, so it can be passed by value.
Constants§
- MIN_
SPACING - The minimum spacing between two points in time to count as unambiguously different. This is related to the typical precision used in *.srt subtitle files.
Traits§
- ToTimestamp
- Convert a time to a timestamp string. This is mostly used for giving files semi-unique names so that we can dump files from multiple, related export runs into a single directory without too much chance of them overwriting each other unless they’re basically the same file.
Functions§
- seconds_
to_ hhmmss - Converts a time to a pretty, human-readable format, with second precision.
- seconds_
to_ hhmmss_ sss - Converts a time to a pretty, human-readable format, with millisecond precision.