DEENESPTFRRUARHIKOZHNL

class ara::core::SteadyClock

[SWS_CORE_06401] Upstream: RS_AP_00130

class SteadyClock final {...};

This clock represents a monotonic clock. The time points of this clock cannot decrease as physical time moves forward and the time between ticks of this clock is constant.

Header-Datei#include "ara/core/steady_clock.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core

User GuideAI-GENERATED

Provides a strictly monotonic clock with nanosecond resolution for time-invariant interval measurements and deadlines.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: c5876cb77c90 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Provides a strictly monotonic clock with nanosecond resolution for time-invariant interval measurements and deadlines.

The class provides a monotonic, steady clock with nanosecond resolution for measuring time periods and deadlines, whose time points never decrease ([SWS_CORE_06431], [SWS_CORE_06413]). Via the static function now(), applications obtain the current timestamp thread-safely and without exception risk [SWS_CORE_06432]. By calculating the difference between two time points, the execution duration of operations can be determined robustly.

Context

The class ara::core::SteadyClock provides a monotonic clock for precise time measurement in the AUTOSAR Adaptive Platform. Its primary responsibility is to deliver steadily increasing time points; time points of this clock can never decrease as physical time advances, and the duration between ticks is constant. Via the property is_steady = true [SWS_CORE_06431], this invariance is guaranteed.

The time model of the class is based on the C++ standard clock concepts and standardizes the measurement units for time intervals and time points. The tick period of the clock is defined as a nanosecond via the type alias period ([SWS_CORE_06413]: using period = std::nano). A signed 64-bit integer type serves as the representation type for the tick count ([SWS_CORE_06412]: using rep = std::int64_t). On this basis, using duration = std::chrono::duration<rep, period> [SWS_CORE_06411] represents the relative time interval, while using time_point = std::chrono::time_point<SteadyClock, duration> [SWS_CORE_06414] binds specific time points to this clock. Typical interaction partners are application components that need to determine execution durations or monitor deadlines.

Lifecycle

The class is specified as final and contains exclusively static interfaces. Interpretation: An instantiation of ara::core::SteadyClock is neither intended nor required for practical use, since the class serves as a static namespace and type identifier for time_point. Question Q-08b479dc497c8f74 (open) There are no state transitions, initialization phases, or destruction routines.

For concurrent access from multiple threads, the central query function now() is explicitly specified as thread-safe [SWS_CORE_06432]. Multiple threads can therefore acquire timestamps concurrently and without additional external synchronization.

Usage Path

A typical usage path of ara::core::SteadyClock is measuring the execution duration of a program section. At the beginning, the caller queries the current timestamp via the static method ara::core::SteadyClock::now() [SWS_CORE_06432], returning an object of type time_point [SWS_CORE_06414]. Subsequently, the application performs the intended operation. Upon its completion, another call to now() [SWS_CORE_06432] occurs. By subtracting the start time point from the end time point, the application calculates the elapsed duration as duration [SWS_CORE_06411]. Since is_steady guarantees that the clock never runs backwards [SWS_CORE_06431], the result is always monotonic and reliable as physical time advances.

Time interval measurement with ara::core::SteadyClockApplicationSteadyClocknow()t_start: time_pointExecute operationnow()t_ende: time_pointDauer = t_ende - t_start

Sequence diagram: Typical sequence of a duration measurement by determining two time points. Sources: [SWS_CORE_06432], [SWS_CORE_06411], [SWS_CORE_06414]

Error Scenarios

The interface of ara::core::SteadyClock does not provide for error codes or error states. Function now() is declared as noexcept and possesses the exception safe property [SWS_CORE_06432]. A call to now() fails under no regular operating conditions and is guaranteed to return a valid value of type time_point [SWS_CORE_06414].

Interpretation: A theoretical value overflow of counter rep [SWS_CORE_06412] is likely to occur in real systems only after several centuries of operation due to the 64-bit value range at nanosecond ticks, and thus poses no practical error risk. Question Q-9ce575da867b8203 (open)

This guide is based on the specification AUTOSAR Adaptive Platform Release R25-11.

Member map

Methods

1

Constants

1

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__core__SteadyClock455 SteadyClock + is_steady + now()

Detail view

Select an entry in the outline.

Methods

now function

Return a time_point representing the current value of the clock.

static time_point now () noexcept;

Type aliases

duration type alias

std::chrono::duration<rep, period> ≙ std::chrono::duration

using duration = std::chrono::duration<rep, period>;
period type alias

A std::ratio type representing the tick period of the clock, in seconds . ≙ std::ratio

using period = std::nano;
rep type alias

An arithmetic type representing the number of ticks in the clock’s duration .

using rep = std::int64_t;
time_point type alias

std::chrono::time_point<ara::core::SteadyClock> ≙ std::chrono::time_point

Constants

is_steady variable

steady clock flag, always true

static constexpr bool is_steady = true;

Method documentation

function now [SWS_CORE_06432] Upstream: RS_AP_00130

static time_point now () noexcept;

Return a time_point representing the current value of the clock.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 24ebb1344fe4 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The static function ara::core::SteadyClock::now() synchronously returns a time_point representing the current tick count of the clock [SWS_CORE_06432]. For usage, the header file ara/core/steady_clock.h must be included [SWS_CORE_06432]. Since the method is statically bound to ara::core::SteadyClock, no instantiation of the class is required; access occurs directly via the scope.

Regarding error handling, the function is declared with noexcept and designated as exception-safe (exception safe) [SWS_CORE_06432]. Callers therefore do not need to provide exception handling for the time query, as the operation is guaranteed to return without errors.

With respect to concurrency and restrictions, now() is specified as thread-safe (thread-safe) [SWS_CORE_06432]. The function may be called in parallel from arbitrary execution contexts and threads without application-side synchronization.

Within the interfaces of ara::core::SteadyClock, the function is likely primarily intended to provide points in time for relative interval measurements and runtime determinations (interpretation: derived from the scope and the return type [SWS_CORE_06432]). Question Q-34b2317714fd4e03 (open)

This usage note was generated automatically and is based on the specification of AUTOSAR Adaptive R25-11.

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
time_pointa time_point

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06432
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06432@rel:R25-11#bd3e1800
Content hash
bd3e1800
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06432
Status: valid/unmigrated Version: rel:R25-11#5c6a8c47 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06432@rel:R25-11#5c6a8c47
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#bd3e18002026-09-30
  • R20-11rel:R20-11#2ebaac9e2026-10-14
  • R21-11rel:R21-11#2ebaac9e2026-10-14
  • R22-11rel:R22-11#23f195162026-10-14
  • R23-11rel:R23-11#1e8f88b82026-10-14
  • R24-11rel:R24-11#5c6a8c472026-10-14
  • R25-11rel:R25-11#5c6a8c472026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Type alias documentation

type alias duration [SWS_CORE_06411] Upstream: RS_AP_00130

using duration = std::chrono::duration<rep, period>;

std::chrono::duration<rep, period>

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Symbolduration

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06411
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06411@rel:R25-11#8d0579d8
Content hash
8d0579d8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06411
Status: valid/unmigrated Version: rel:R25-11#604e5eff Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06411@rel:R25-11#604e5eff
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#8d0579d82026-09-30
  • R20-11rel:R20-11#0b720af62026-10-14
  • R21-11rel:R21-11#0b720af62026-10-14
  • R22-11rel:R22-11#da4c16bd2026-10-14
  • R23-11rel:R23-11#604e5eff2026-10-14
  • R24-11rel:R24-11#604e5eff2026-10-14
  • R25-11rel:R25-11#604e5eff2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

type alias period [SWS_CORE_06413] Upstream: RS_AP_00130

using period = std::nano;

A std::ratio type representing the tick period of the clock, in seconds .

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Symbolperiod

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06413
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06413@rel:R25-11#b4ea22ad
Content hash
b4ea22ad
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06413
Status: valid/unmigrated Version: rel:R25-11#23d3f8ae Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06413@rel:R25-11#23d3f8ae
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#b4ea22ad2026-09-30
  • R20-11rel:R20-11#736232b22026-10-14
  • R21-11rel:R21-11#736232b22026-10-14
  • R22-11rel:R22-11#7d2f0f372026-10-14
  • R23-11rel:R23-11#23d3f8ae2026-10-14
  • R24-11rel:R24-11#23d3f8ae2026-10-14
  • R25-11rel:R25-11#23d3f8ae2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

type alias rep [SWS_CORE_06412] Upstream: RS_AP_00130

using rep = std::int64_t;

An arithmetic type representing the number of ticks in the clock’s duration .

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Symbolrep

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06412
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06412@rel:R25-11#bf21afd7
Content hash
bf21afd7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06412
Status: valid/unmigrated Version: rel:R25-11#2bb738d9 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06412@rel:R25-11#2bb738d9
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#bf21afd72026-09-30
  • R20-11rel:R20-11#a465a7e92026-10-14
  • R21-11rel:R21-11#00a900252026-10-14
  • R22-11rel:R22-11#12d2049d2026-10-14
  • R23-11rel:R23-11#9dca85212026-10-14
  • R24-11rel:R24-11#9dca85212026-10-14
  • R25-11rel:R25-11#2bb738d92026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

type alias time_point [SWS_CORE_06414] Upstream: RS_AP_00130

using time_point = std::chrono::time_point<SteadyClock, duration>;

std::chrono::time_point<ara::core::SteadyClock>

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Symboltime_point

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06414
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06414@rel:R25-11#1aef719d
Content hash
1aef719d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06414
Status: valid/unmigrated Version: rel:R25-11#1b006689 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06414@rel:R25-11#1b006689
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1aef719d2026-09-30
  • R20-11rel:R20-11#c8d776632026-10-14
  • R21-11rel:R21-11#dc1e7e5a2026-10-14
  • R22-11rel:R22-11#8a18d9d52026-10-14
  • R23-11rel:R23-11#9f525c1b2026-10-14
  • R24-11rel:R24-11#1b0066892026-10-14
  • R25-11rel:R25-11#1b0066892026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

Documentation of constants / variables

variable is_steady [SWS_CORE_06431] Upstream: RS_AP_00130

static constexpr bool is_steady = true;

steady clock flag, always true

Header-Datei#include "ara/core/steady_clock.h"
Scopeclass ara::core::SteadyClock
Symbolis_steady
Typbool

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06431
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06431@rel:R25-11#cc7c9da8
Content hash
cc7c9da8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06431
Status: valid/unmigrated Version: rel:R25-11#577f28aa Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06431@rel:R25-11#577f28aa
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#cc7c9da82026-09-30
  • R20-11rel:R20-11#07665d652026-10-14
  • R21-11rel:R21-11#737caacf2026-10-14
  • R22-11rel:R22-11#6d708f332026-10-14
  • R23-11rel:R23-11#577f28aa2026-10-14
  • R24-11rel:R24-11#577f28aa2026-10-14
  • R25-11rel:R25-11#577f28aa2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill