Home / Function/ formatDuration() — tailwindcss Function Reference

formatDuration() — tailwindcss Function Reference

Architecture documentation for the formatDuration() function in renderer.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  631984cc_17f1_69a1_5686_3f0b82fc1796["formatDuration()"]
  cc1a3f06_4b21_684c_487a_f342bd18d772["renderer.ts"]
  631984cc_17f1_69a1_5686_3f0b82fc1796 -->|defined in| cc1a3f06_4b21_684c_487a_f342bd18d772
  8f39fcf0_a336_611c_df3e_e1ab37efa73a["formatNanoseconds()"]
  631984cc_17f1_69a1_5686_3f0b82fc1796 -->|calls| 8f39fcf0_a336_611c_df3e_e1ab37efa73a
  style 631984cc_17f1_69a1_5686_3f0b82fc1796 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-cli/src/utils/renderer.ts lines 72–80

export function formatDuration(ns: bigint) {
  let formatted = formatNanoseconds(ns)

  if (ns <= 50 * 1e6) return pc.green(formatted)
  if (ns <= 300 * 1e6) return pc.blue(formatted)
  if (ns <= 1000 * 1e6) return pc.yellow(formatted)

  return pc.red(formatted)
}

Subdomains

Frequently Asked Questions

What does formatDuration() do?
formatDuration() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-cli/src/utils/renderer.ts.
Where is formatDuration() defined?
formatDuration() is defined in packages/@tailwindcss-cli/src/utils/renderer.ts at line 72.
What does formatDuration() call?
formatDuration() calls 1 function(s): formatNanoseconds.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free