Objo.
Feedback Forum Docs Objo Studio
Feedback

Feature #1097

Time-based APIs now use clear, type-safe durations

Status
Fixed
Fixed in
v26.8.3
Source discussion
https://forum.objo.dev/d/753-unitsof-measure-as-a-smart-data-type/4
Last updated
2026-08-05

Upvotes

0 upvotes

Uses your Objo forum account.

Public summary

Time-based APIs now use clear, type-safe durations.

Objo's elapsed-time, delay, interval, timeout, and duration APIs now accept and return a dedicated Duration value type instead of bare numbers, so callers no longer need to remember whether a value means milliseconds or seconds. Code reads naturally, for example Task.Delay(500.Milliseconds()), System.Sleep(2.Seconds()), timer.Interval = 250.Milliseconds(), and connection.Timeout = 30.Seconds().

A Duration represents an amount of elapsed time (100-nanosecond ticks, matching precision used elsewhere in the platform), not a clock reading or a calendar month/year. Duration.Infinite is a type-safe "no timeout" sentinel. Studio provides a "Migrate Project to Duration API…" command plus per-diagnostic Apply Fix actions to help migrate existing code.

Objo.

Build apps visually, deploy anywhere.

Feedback is a public read-only status mirror for Objo Studio.