private static function formatTime(float $value, $format): string {
    switch ($format) {

      case static::FORMAT_PRECISE:
        return (string) ($value * 1000);

      case static::FORMAT_MILLISECONDS:
        return (string) round($value * 1000, 2);

      case static::FORMAT_SECONDS:
        return (string) round($value, 3);

      default:
        return (string) ($value * 1000);
    }
  }