MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / my_useconds_to_str

Function my_useconds_to_str

sql-common/my_time.c:1213–1219  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

1211 @return The length of the result string.
1212*/
1213static inline int
1214my_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/*

Callers 3

my_time_to_strFunction · 0.85
my_datetime_to_strFunction · 0.85
my_timeval_to_strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected