Fix time_to_msec() precision