TimeToString
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DEFunction Syntax
Description
Converts a timestamp or a duration (given in nanoseconds) into a string in the formatdays:hours:minutes:seconds,microseconds. Hours, minutes and seconds are always with two digits; microseconds are with six digits so they show the fraction of the second.
Parameters
- timeNS: Time/duration in nanoseconds. This could be a timestamp of a frame, the time given by timeNowInt64, or a time measured with the CAPLProfiler class.
- buffer: Receives the string. Must be at least 18 characters long (more if the duration is >= 10 days).
Return Values
- 0: Success
- -1: Error, e.g. buffer too small.