/**
 * DurationDisplay
 * 
 * Deterministic formatting for time durations.
 */

export class DurationDisplay {
  /**
   * Formats milliseconds as "123.45ms".
   */
  static formatMs(ms: number): string {
    return `${ms.toFixed(2)}ms`;
  }

  /**
   * Formats seconds as "M:SS.mmm".
   * Example: 65.123 -> "1:05.123"
   */
  static formatSeconds(seconds: number): string {
    const minutes = Math.floor(seconds / 60);
    const remainingSeconds = (seconds % 60).toFixed(3);
    return `${minutes}:${remainingSeconds.padStart(6, '0')}`;
  }
}
