Print the microsecond part: ".NNN" @param to OUT The string pointer to print at @param useconds The microseconds value. @param dec Precision, between 1 and 6. @return The length of the result string. */
| 1211 | @return The length of the result string. |
| 1212 | */ |
| 1213 | static inline int |
| 1214 | my_useconds_to_str(char *to, ulong useconds, uint dec) |
| 1215 | { |
| 1216 | DBUG_ASSERT(dec <= DATETIME_MAX_DECIMALS); |
| 1217 | return sprintf(to, ".%0*lu", (int) dec, |
| 1218 | useconds / (ulong) log_10_int[DATETIME_MAX_DECIMALS - dec]); |
| 1219 | } |
| 1220 | |
| 1221 | |
| 1222 | /* |
no outgoing calls
no test coverage detected