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 GuideKI-GENERIERT

Stellt eine streng monotone Uhr mit Nanosekundenauflösung für zeitinvariante Intervallmessungen und Fristen bereit.
KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: c5876cb77c90 Herkunft Offene Fragen (2)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Stellt eine streng monotone Uhr mit Nanosekundenauflösung für zeitinvariante Intervallmessungen und Fristen bereit.

Die Klasse stellt eine monotone, gleichförmige Uhr mit Nanosekundenauflösung zur Messung von Zeiträumen und Fristen bereit, deren Zeitpunkte niemals abnehmen ([SWS_CORE_06431], [SWS_CORE_06413]). Über die statische Funktion now() erhalten Anwendungen threadsicher und ohne Ausnahmegefahr den aktuellen Zeitstempel [SWS_CORE_06432]. Durch Differenzbildung zweier Zeitpunkte lässt sich die Ausführungsdauer von Operationen robust bestimmen.

Kontext

Die Klasse ara::core::SteadyClock stellt in der AUTOSAR Adaptive Platform eine monotone Uhr zur präzisen Zeitmessung bereit. Ihre Hauptverantwortung besteht darin, stetig ansteigende Zeitpunkte zu liefern; Zeitpunkte dieser Uhr können bei voranschreitender physikalischer Zeit niemals abnehmen, und die Dauer zwischen den Ticks ist konstant. Über die Eigenschaft is_steady = true [SWS_CORE_06431] wird diese Invarianz garantiert.

Das Zeitmodell der Klasse ist an die C++-Standarduhr-Konzepte angelehnt und standardisiert die Maßeinheiten für Zeitintervalle und Zeitpunkte. Die Tick-Periode der Uhr ist über den Typ-Alias period als Nanosekunde definiert ([SWS_CORE_06413]: using period = std::nano). Als Repräsentationstyp für die Tick-Anzahl dient ein vorzeichenbehafteter 64-Bit-Ganzzahltyp ([SWS_CORE_06412]: using rep = std::int64_t). Auf dieser Basis bildet using duration = std::chrono::duration<rep, period> [SWS_CORE_06411] den relativen Zeitabstand ab, während using time_point = std::chrono::time_point<SteadyClock, duration> [SWS_CORE_06414] spezifische Zeitpunkte an diese Uhr bindet. Typische Interaktionspartner sind Anwendungskomponenten, die Ausführungsdauern ermitteln oder Fristen überwachen müssen.

Lebenszyklus

Die Klasse ist als final spezifiziert und enthält ausschließlich statische Schnittstellen. Interpretation: Eine Instanziierung von ara::core::SteadyClock ist für die praktische Verwendung weder vorgesehen noch erforderlich, da die Klasse als statischer Namensraum und Typ-Identifikator für time_point dient. Frage Q-08b479dc497c8f74 (offen) Es gibt keine Zustandsübergänge, Initialisierungsphasen oder Zerstörungsroutinen.

Für den gleichzeitigen Zugriff aus mehreren Threads ist die zentrale Abfragefunktion now() ausdrücklich als threadsicher (thread-safe) spezifiziert [SWS_CORE_06432]. Mehrere Threads können daher nebenläufig und ohne zusätzliche externe Synchronisation Zeitstempel erfassen.

Nutzungspfad

Ein typischer Nutzungspfad von ara::core::SteadyClock ist die Messung der Ausführungsdauer eines Programmabschnitts. Zu Beginn fragt der Aufrufer über die statische Methode ara::core::SteadyClock::now() [SWS_CORE_06432] den aktuellen Zeitstempel ab, wodurch ein Objekt des Typs time_point [SWS_CORE_06414] zurückgegeben wird. Anschließend führt die Anwendung die vorgesehene Operation aus. Nach deren Beendigung erfolgt ein erneuter Aufruf von now() [SWS_CORE_06432]. Durch Subtraktion des Startzeitpunkts vom Endzeitpunkt berechnet die Anwendung die verstrichene Dauer als duration [SWS_CORE_06411]. Da is_steady garantiert, dass die Uhr niemals rückwärts läuft [SWS_CORE_06431], ist das Ergebnis bei voranschreitender physikalischer Zeit stets monoton und verlässlich.

Zeitintervallmessung mit ara::core::SteadyClockAnwendungSteadyClocknow()t_start: time_pointOperation ausführennow()t_ende: time_pointDauer = t_ende - t_start

Sequenzdiagramm: Typischer Ablauf einer Dauermessung durch Ermittlung zweier Zeitpunkte. Quellen: [SWS_CORE_06432], [SWS_CORE_06411], [SWS_CORE_06414]

Fehlerszenarien

Die Schnittstelle von ara::core::SteadyClock sieht keine Fehlercodes oder Fehlerzustände vor. Die Funktion now() ist als noexcept deklariert und besitzt die Eigenschaft ausnahmesicher (exception safe) [SWS_CORE_06432]. Ein Aufruf von now() schlägt unter keinen regulären Betriebsbedingungen fehl und liefert garantiert einen gültigen Wert vom Typ time_point [SWS_CORE_06414] zurück.

Interpretation: Ein theoretischer Werteüberlauf des Zählers rep [SWS_CORE_06412] dürfte in realen Systemen aufgrund des 64-Bit-Wertebereichs bei Nanosekundenticks rechnerisch erst nach mehreren Jahrhunderten Betriebszeit eintreten und stellt somit kein praktisches Fehlerrisiko dar. Frage Q-9ce575da867b8203 (offen)

Dieser Leitfaden basiert auf der Spezifikation AUTOSAR Adaptive Platform Release R25-11.

Mitgliederkarte

Methoden

1

Konstanten

1

Klassendiagramm

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

G nara__core__SteadyClock455 SteadyClock + is_steady + now()

Detailansicht

Wähle in der Gliederung einen Eintrag aus.

Methoden

now function

Return a time_point representing the current value of the clock.

static time_point now () noexcept;

Typaliase

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

Konstanten

is_steady variable

steady clock flag, always true

static constexpr bool is_steady = true;

Dokumentation der Methoden

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.

KI-GENERIERT ungeprüft Modell: gemini-3.8-flash-medium · Aufwand: medium · Temperatur: nicht steuerbar · Prompt: 24ebb1344fe4 Herkunft Offene Fragen (1)
KI-generiertgemini-3.8-flash-medium · 2026-10-13

Die statische Funktion ara::core::SteadyClock::now() liefert synchron einen time_point zurück, welcher den aktuellen Zählerstand der Uhr darstellt [SWS_CORE_06432]. Zur Verwendung ist die Header-Datei ara/core/steady_clock.h einzubinden [SWS_CORE_06432]. Da die Methode statisch an ara::core::SteadyClock gebunden ist, ist keine Instanziierung der Klasse notwendig; der Zugriff erfolgt direkt über den Scope.

In Bezug auf die Fehlerbehandlung ist die Funktion mit noexcept deklariert und als ausnahmesicher (exception safe) ausgewiesen [SWS_CORE_06432]. Aufrufer müssen folglich keine Exception-Behandlung für die Zeitabfrage vorsehen, da die Operation garantiert fehlerfrei zurückkehrt.

Hinsichtlich Nebenläufigkeit und Einschränkungen ist now() als threadsicher (thread-safe) spezifiziert [SWS_CORE_06432]. Die Funktion darf ohne anwendungsseitige Synchronisation parallel aus beliebigen Ausführungskontexten und Threads aufgerufen werden.

Innerhalb der Schnittstellen von ara::core::SteadyClock dürfte die Funktion primär dazu dienen, Zeitpunkte für relative Intervallmessungen und Laufzeitermittlungen bereitzustellen (Interpretation: abgeleitet aus dem Scope und dem Rückgabetyp [SWS_CORE_06432]). Frage Q-34b2317714fd4e03 (offen)

Dieser Nutzungshinweis wurde automatisiert erstellt und basiert auf der Spezifikation von 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

Dokumentation der Typaliase

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

Dokumentation der Konstanten / Variablen

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