Preliminary. ThinkMeta ConcurrentTasks and this documentation are preliminary; everything is subject to change.

API reference / Core

Duration struct

A span of time, counted in units of 100 nanoseconds.

Use
#include <ThinkMeta.ConcurrentTasks/Core.h>
Namespace
ThinkMeta::ConcurrentTasks

Syntax

struct Duration

Remarks

100 ns is the unit of Windows timers. Built with Duration::Microseconds, Duration::Milliseconds or Duration::Seconds, so that a plain number never passes for one. The core's timer thread waits on a high-resolution waitable timer: on Windows 10 1803 and later it fires on a grid of about half a millisecond, otherwise on the system tick (about 15.6 ms). A duration says how long at least; the task may start or wake that much later.

See also

Duration::Infinite

Methods

Microseconds

A duration of microseconds.

Syntax

static constexpr Duration Microseconds(long long count) noexcept;

Parameters

countlong long
Number of microseconds; small enough not to overflow.

Return value

Type: Duration

The duration of count microseconds.

Milliseconds

A duration of milliseconds.

Syntax

static constexpr Duration Milliseconds(long long count) noexcept;

Parameters

countlong long
Number of milliseconds; small enough not to overflow.

Return value

Type: Duration

The duration of count milliseconds.

Seconds

A duration of seconds.

Syntax

static constexpr Duration Seconds(long long count) noexcept;

Parameters

countlong long
Number of seconds; small enough not to overflow.

Return value

Type: Duration

The duration of count seconds.

Infinite

A timeout that never expires.

Syntax

static constexpr Duration Infinite() noexcept;

Return value

Type: Duration

The largest representable duration, reserved as "no timeout".

Remarks

Waiting with it is waiting without a timeout.

See also

IsInfinite

IsInfinite

Returns whether this is Infinite.

Syntax

constexpr bool IsInfinite() const noexcept;

Return value

Type: bool

true if this duration equals Infinite; otherwise false.

Remarks

Exactly; no other value counts.

Fields

hundredNanoseconds

The length in units of 100 nanoseconds.

Syntax

long long hundredNanoseconds;

Generated from ThinkMeta.ConcurrentTasks.API @ 137ec1d (2026-10-17).