Skip to main content

otHistoryTrackerEntryAgeToString

Function otHistoryTrackerEntryAgeToString 

Source
pub unsafe extern "C" fn otHistoryTrackerEntryAgeToString(
    aEntryAge: u32,
    aBuffer: *mut c_char,
    aSize: u16,
)
Expand description

Converts a given entry age to a human-readable string.

The entry age string follows the format hours:minutes:seconds:milliseconds (if shorter than one day) or days:hours:minutes:seconds(if longer than one 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.

@param[in] aEntryAge The entry age (duration in msec). @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). @param[in] aSize The size of @p aBuffer. Recommended to use OT_HISTORY_TRACKER_ENTRY_AGE_STRING_SIZE.