Skip to main content

truncated_subsecond_from_nanos

Function truncated_subsecond_from_nanos 

Source
pub(crate) const fn truncated_subsecond_from_nanos(
    n: ru32<0, 999_999_999>,
) -> StackStr<9>
Expand description

Obtain a string of 1 to 9 ASCII digits representing n, which is a number of nanoseconds.

This value is intended to be used after a decimal point to represent a fractional second. Trailing zeros are truncated, but at least one digit is always present.