code: 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);
      }
    }
docs: Formats the given time the processor into the given format.
  @param float $value
  @param string|bool $format
  @return string