| 186 | |
| 187 | |
| 188 | inline ulonglong TIME_to_ulonglong_time_round(const MYSQL_TIME *ltime) |
| 189 | { |
| 190 | if (ltime->second_part < 500000) |
| 191 | return TIME_to_ulonglong_time(ltime); |
| 192 | if (ltime->second < 59) |
| 193 | return TIME_to_ulonglong_time(ltime) + 1; |
| 194 | // Corner case e.g. 'hh:mm:59.5'. Proceed with slower method. |
| 195 | MYSQL_TIME tmp= *ltime; |
| 196 | my_time_round(&tmp, 0); |
| 197 | return TIME_to_ulonglong_time(&tmp); |
| 198 | } |
| 199 | |
| 200 | |
| 201 | inline ulonglong TIME_to_ulonglong_round(const MYSQL_TIME *ltime) |
no test coverage detected