Write a textual representation of this time into result.
Declared in <bdlt_time.h>
int
printToBuffer(
char* result,
int numBytes,
int fractionalSecondPrecision = 6) const;
Efficiently write to the specified result buffer no more than the specified numBytes of a representation of the value of this object. Optionally specify fractionalSecondPrecision digits to indicate how many fractional second digits to output. If fractionalSecondPrecision is not specified then 6 fractional second digits will be output (3 digits for milliseconds and 3 digits for microseconds). Return the number of characters (not including the null character) that would have been written if the limit due to numBytes were not imposed. result is null-terminated unless numBytes is 0. The behavior is undefined unless 0 <= numBytes, 0 <= fractionalSecondPrecision <= 6, and result refers to at least numBytes contiguous bytes. Note that the return value is greater than or equal to numBytes if the output representation was truncated to avoid result overrun.
the number of characters that would have been written
| Name | Description |
|---|---|
| result | output buffer |
| numBytes | maximum number of bytes to write |
| fractionalSecondPrecision | fractional second digits (default 6) |