Formats a time.
numerical $time A raw time:
float The formatted time
\InvalidArgumentException When the raw time is not valid
private function formatTime($time) {
if (!is_numeric($time)) {
throw new \InvalidArgumentException('The time must be a numerical value');
}
return round($time, 1);
}