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.

On this page
Use
#include <ThinkMeta.ConcurrentTasks/Core.h>
Namespace
ThinkMeta::ConcurrentTasks
Platforms
Windows, Linux

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 timer: on Windows 10 1803 and later it fires on a grid of about half a millisecond, on older Windows on the system tick (about 15.6 ms), on Linux on the kernel's high-resolution timers. 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(std::int64_t count) noexcept;

Parameters

countstd::int64_t
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(std::int64_t count) noexcept;

Parameters

countstd::int64_t
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(std::int64_t count) noexcept;

Parameters

countstd::int64_t
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

std::int64_t hundredNanoseconds;

Generated from ThinkMeta.ConcurrentTasks.API @ c7663c4 (2026-11-19).