Skip to main content

parse_time_string_to_ticks

Function parse_time_string_to_ticks 

Source
pub(crate) fn parse_time_string_to_ticks(
    input: &str,
    timescale: &TimeScale,
) -> Option<BigInt>
Expand description

Parse a time string (optionally with units) and convert to timescale ticks.

Accepts plain integers ("100") and unit-suffixed values ("100ns", "1.5 ms"). When no unit is present the value is treated as raw timescale ticks (same as the previous behaviour of cursor_set). Returns None if the input cannot be parsed.