pub unsafe extern "C" fn otConvertDurationInSecondsToString(
    aDuration: u32,
    aBuffer: *mut c_char,
    aSize: u16
)
Expand description

Converts an uint32_t duration (in seconds) to a human-readable string.

Requires OPENTHREAD_CONFIG_UPTIME_ENABLE to be enabled.

The string follows the format “::” for hours, minutes, seconds (if duration is shorter than one day) or “

d.::” (if longer than a day).

If the resulting string does not fit in @p aBuffer (within its @p aSize characters), the string will be truncated but the outputted string is always null-terminated.

Is intended for use with mAge or mConnectionTime in otNeighborInfo or otChildInfo structures.

@param[in] aDuration A duration interval in seconds. @param[out] aBuffer A pointer to a char array to output the string. @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use OT_DURATION_STRING_SIZE.