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

Function TIME_to_ulonglong_time_round

sql/sql_time.h:188–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187
188inline 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
201inline ulonglong TIME_to_ulonglong_round(const MYSQL_TIME *ltime)

Callers 1

TIME_to_ulonglong_roundFunction · 0.85

Calls 2

TIME_to_ulonglong_timeFunction · 0.85
my_time_roundFunction · 0.85

Tested by

no test coverage detected