port "Report timing with more precision" by @dveeden
based upon: https://github.com/dveeden/mysql-server/commit/d5e46428075d86dbdc333d27951bb06cb4c11a32 MariaDB [test]> select sleep(0.123); +--------------+ | sleep(0.123) | +--------------+ | 0 | +--------------+ 1 row in set (0.123 sec) "More exact timing for mysql client based on my_timer_microseconds" Based on suggestion from @grooverdan on https://github.com/mysql/mysql-server/pull/112 This patch is slightly bigger because the original did not preserve the return type of my_timer_microseconds and this patch does. (my_timer_microseconds returns ulonglong, not simply ulong) Also I believe the correct place to do the division of microseconds to seconds is better in the caller of nice_time because nice_time takes a "double sec" param, so we should convert before calling; the other caller of nice_time does not call with microseconds.
Showing
Please register or sign in to comment