---
title: "[RFC] Duration class"
url: https://daily.dev/posts/rfc-duration-class-g7gnnaxsg
source_url: https://externals.io/message/131471
type: article
source: "externals.io"
published: 2026-06-22T17:45:09.435Z
updated: 2026-06-22T18:25:26.835Z
tags: ["architecture", "php"]
reading_time: 64
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# [RFC] Duration class

**[externals.io](https://daily.dev/sources/externals)** · 64 min read · 0 upvotes · 0 comments

## Summary

Tim Düsterhus and Derick Rethans have proposed a new `Time\Duration` class for PHP 8.6 to represent stopwatch-style durations, primarily to improve the developer experience for timeout APIs including the new Polling API. The RFC is intentionally minimal, using a seconds+nanoseconds internal representation (similar to Rust's and Java's Duration). The mailing list discussion covers design decisions including: why the highest constructor unit is hours while internal storage uses seconds; the absence of ISO 8601 serialization (deferred to PHP 8.7); omission of floating-point total methods due to precision concerns; the choice of `Time` namespace over `DateTime`; rejection of using the temporal_rs Rust library as a backend; and debate over whether to use `add`/`sub` methods or a single variadic `sum` method.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://externals.io/message/131471>

## Similar posts on daily.dev

- [\[RFC\] Duration class](https://daily.dev/posts/rfc-duration-class-lb3espda8) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Duration class](https://daily.dev/posts/rfc-duration-class-oqp1hd6as) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Duration class](https://daily.dev/posts/rfc-duration-class-ateaybs2s) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Duration class](https://daily.dev/posts/rfc-duration-class-m3rrdgn0c) · externals.io · 0 upvotes · 0 comments
- [\[RFC\] Duration class](https://daily.dev/posts/rfc-duration-class-xunreglis) · externals.io · 0 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#php](https://daily.dev/tags/php)

[View this post on daily.dev](https://daily.dev/posts/rfc-duration-class-g7gnnaxsg)
