#duration Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
Kotlin kotlin.time — Duration and measureTime
`kotlin.time.Duration` is a typesafe time amount with friendly literal syntax (`5.seconds`, `2.minutes`). `measureTime { }` benchmarks a block.
PHP Format Duration in Seconds
Render a number of seconds as a human-friendly duration like "1h 23m 45s" — automatically trimming leading zero units. Handy for elapsed-time displays in dashboards.
TypeScript Format Duration in ms
Render a number of milliseconds as a human-friendly duration: "1h 23m 45s". Skips leading-zero units automatically so short durations are concise.
Java java.time — Duration and Period
`Duration` for elapsed time (hours/minutes/seconds). `Period` for calendar amounts (days/months/years). Don't mix — calendar math respects month lengths and DST; clock math doesn't.