Changeset 38ec48d in rtems-docs


Ignore:
Timestamp:
10/11/21 15:05:21 (9 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
513b90d
Parents:
61410da
git-author:
Sebastian Huber <sebastian.huber@…> (10/11/21 15:05:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/19/21 07:49:46)
Message:

c-user: Document new clock manager directives

Add new clock manager directives to get all times provided by the
timehands.

Close #4527.

Location:
c-user/clock
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c-user/clock/directives.rst

    r61410da r38ec48d  
    221221* The directive requires a :term:`Clock Driver`.
    222222
     223.. Generated from spec:/rtems/clock/if/get-realtime
     224
     225.. raw:: latex
     226
     227    \clearpage
     228
     229.. index:: rtems_clock_get_realtime()
     230
     231.. _InterfaceRtemsClockGetRealtime:
     232
     233rtems_clock_get_realtime()
     234--------------------------
     235
     236Gets the time elapsed since the :term:`Unix epoch` measured using
     237:term:`CLOCK_REALTIME` in seconds and nanoseconds format.
     238
     239.. rubric:: CALLING SEQUENCE:
     240
     241.. code-block:: c
     242
     243    void rtems_clock_get_realtime( struct timespec *time_snapshot );
     244
     245.. rubric:: PARAMETERS:
     246
     247``time_snapshot``
     248    This parameter is the pointer to a `struct timespec
     249    <https://en.cppreference.com/w/c/chrono/timespec>`_ object.  The time
     250    elapsed since the :term:`Unix epoch` measured using the
     251    :term:`CLOCK_REALTIME` at some time point during the directive call will be
     252    stored in this object.  Calling the directive with a pointer equal to `NULL
     253    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     254
     255.. rubric:: NOTES:
     256
     257The directive accesses a device provided by the :term:`Clock Driver` to get the
     258time in the highest precision available to the system.  Alternatively, the
     259:ref:`InterfaceRtemsClockGetRealtimeCoarse` directive may be used to get the
     260time with less precision and less runtime overhead.
     261
     262See :ref:`InterfaceRtemsClockGetRealtimeBintime` and
     263:ref:`InterfaceRtemsClockGetRealtimeTimeval` to get the time in alternative
     264formats.
     265
     266.. rubric:: CONSTRAINTS:
     267
     268The following constraints apply to this directive:
     269
     270* The directive may be called from within any runtime context.
     271
     272* The directive will not cause the calling task to be preempted.
     273
     274* The directive requires a :term:`Clock Driver`.
     275
     276.. Generated from spec:/rtems/clock/if/get-realtime-bintime
     277
     278.. raw:: latex
     279
     280    \clearpage
     281
     282.. index:: rtems_clock_get_realtime_bintime()
     283
     284.. _InterfaceRtemsClockGetRealtimeBintime:
     285
     286rtems_clock_get_realtime_bintime()
     287----------------------------------
     288
     289Gets the time elapsed since the :term:`Unix epoch` measured using
     290:term:`CLOCK_REALTIME` in binary time format.
     291
     292.. rubric:: CALLING SEQUENCE:
     293
     294.. code-block:: c
     295
     296    void rtems_clock_get_realtime_bintime( struct bintime *time_snapshot );
     297
     298.. rubric:: PARAMETERS:
     299
     300``time_snapshot``
     301    This parameter is the pointer to a :c:type:`bintime` object.  The time
     302    elapsed since the :term:`Unix epoch` measured using the
     303    :term:`CLOCK_REALTIME` at some time point during the directive call will be
     304    stored in this object.  Calling the directive with a pointer equal to `NULL
     305    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     306
     307.. rubric:: NOTES:
     308
     309The directive accesses a device provided by the :term:`Clock Driver` to get the
     310time in the highest precision available to the system.  Alternatively, the
     311:ref:`InterfaceRtemsClockGetRealtimeCoarseBintime` directive may be used to get
     312the time with less precision and less runtime overhead.
     313
     314See :ref:`InterfaceRtemsClockGetRealtime` and
     315:ref:`InterfaceRtemsClockGetRealtimeTimeval` to get the time in alternative
     316formats.
     317
     318.. rubric:: CONSTRAINTS:
     319
     320The following constraints apply to this directive:
     321
     322* The directive may be called from within any runtime context.
     323
     324* The directive will not cause the calling task to be preempted.
     325
     326* The directive requires a :term:`Clock Driver`.
     327
     328.. Generated from spec:/rtems/clock/if/get-realtime-timeval
     329
     330.. raw:: latex
     331
     332    \clearpage
     333
     334.. index:: rtems_clock_get_realtime_timeval()
     335
     336.. _InterfaceRtemsClockGetRealtimeTimeval:
     337
     338rtems_clock_get_realtime_timeval()
     339----------------------------------
     340
     341Gets the time elapsed since the :term:`Unix epoch` measured using
     342:term:`CLOCK_REALTIME` in seconds and microseconds format.
     343
     344.. rubric:: CALLING SEQUENCE:
     345
     346.. code-block:: c
     347
     348    void rtems_clock_get_realtime_timeval( struct timeval *time_snapshot );
     349
     350.. rubric:: PARAMETERS:
     351
     352``time_snapshot``
     353    This parameter is the pointer to a `struct timeval
     354    <https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html>`_
     355    object.  The time elapsed since the :term:`Unix epoch` measured using the
     356    :term:`CLOCK_REALTIME` at some time point during the directive call will be
     357    stored in this object.  Calling the directive with a pointer equal to `NULL
     358    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     359
     360.. rubric:: NOTES:
     361
     362The directive accesses a device provided by the :term:`Clock Driver` to get the
     363time in the highest precision available to the system.  Alternatively, the
     364:ref:`InterfaceRtemsClockGetRealtimeCoarseTimeval` directive may be used to get
     365the time with less precision and less runtime overhead.
     366
     367See :ref:`InterfaceRtemsClockGetRealtime` and
     368:ref:`InterfaceRtemsClockGetRealtimeBintime` to get the time in alternative
     369formats.
     370
     371.. rubric:: CONSTRAINTS:
     372
     373The following constraints apply to this directive:
     374
     375* The directive may be called from within any runtime context.
     376
     377* The directive will not cause the calling task to be preempted.
     378
     379* The directive requires a :term:`Clock Driver`.
     380
     381.. Generated from spec:/rtems/clock/if/get-realtime-coarse
     382
     383.. raw:: latex
     384
     385    \clearpage
     386
     387.. index:: rtems_clock_get_realtime_coarse()
     388
     389.. _InterfaceRtemsClockGetRealtimeCoarse:
     390
     391rtems_clock_get_realtime_coarse()
     392---------------------------------
     393
     394Gets the time elapsed since the :term:`Unix epoch` measured using
     395:term:`CLOCK_REALTIME` in coarse precision in seconds and nanoseconds format.
     396
     397.. rubric:: CALLING SEQUENCE:
     398
     399.. code-block:: c
     400
     401    void rtems_clock_get_realtime_coarse( struct timespec *time_snapshot );
     402
     403.. rubric:: PARAMETERS:
     404
     405``time_snapshot``
     406    This parameter is the pointer to a `struct timespec
     407    <https://en.cppreference.com/w/c/chrono/timespec>`_ object.  The time
     408    elapsed since the :term:`Unix epoch` measured using the
     409    :term:`CLOCK_REALTIME` at some time point close to the directive call will
     410    be stored in this object.  Calling the directive with a pointer equal to
     411    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     412    behaviour.
     413
     414.. rubric:: NOTES:
     415
     416The directive does not access a device to get the time.  It uses a recent
     417snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     418:ref:`InterfaceRtemsClockGetRealtime` directive may be used to get the time
     419with higher precision and higher runtime overhead.
     420
     421See :ref:`InterfaceRtemsClockGetRealtimeCoarseBintime` and
     422:ref:`InterfaceRtemsClockGetRealtimeCoarseTimeval` to get the time in
     423alternative formats.
     424
     425.. rubric:: CONSTRAINTS:
     426
     427The following constraints apply to this directive:
     428
     429* The directive may be called from within any runtime context.
     430
     431* The directive will not cause the calling task to be preempted.
     432
     433* The directive requires a :term:`Clock Driver`.
     434
     435.. Generated from spec:/rtems/clock/if/get-realtime-coarse-bintime
     436
     437.. raw:: latex
     438
     439    \clearpage
     440
     441.. index:: rtems_clock_get_realtime_coarse_bintime()
     442
     443.. _InterfaceRtemsClockGetRealtimeCoarseBintime:
     444
     445rtems_clock_get_realtime_coarse_bintime()
     446-----------------------------------------
     447
     448Gets the time elapsed since the :term:`Unix epoch` measured using
     449:term:`CLOCK_REALTIME` in coarse precision in binary time format.
     450
     451.. rubric:: CALLING SEQUENCE:
     452
     453.. code-block:: c
     454
     455    void rtems_clock_get_realtime_coarse_bintime( struct bintime *time_snapshot );
     456
     457.. rubric:: PARAMETERS:
     458
     459``time_snapshot``
     460    This parameter is the pointer to a :c:type:`bintime` object.  The time
     461    elapsed since the :term:`Unix epoch` measured using the
     462    :term:`CLOCK_REALTIME` at some time point close to the directive call will
     463    be stored in this object.  Calling the directive with a pointer equal to
     464    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     465    behaviour.
     466
     467.. rubric:: NOTES:
     468
     469The directive does not access a device to get the time.  It uses a recent
     470snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     471:ref:`InterfaceRtemsClockGetRealtimeBintime` directive may be used to get the
     472time with higher precision and higher runtime overhead.
     473
     474See :ref:`InterfaceRtemsClockGetRealtimeCoarse` and
     475:ref:`InterfaceRtemsClockGetRealtimeCoarseTimeval` to get the time in
     476alternative formats.
     477
     478.. rubric:: CONSTRAINTS:
     479
     480The following constraints apply to this directive:
     481
     482* The directive may be called from within any runtime context.
     483
     484* The directive will not cause the calling task to be preempted.
     485
     486* The directive requires a :term:`Clock Driver`.
     487
     488.. Generated from spec:/rtems/clock/if/get-realtime-coarse-timeval
     489
     490.. raw:: latex
     491
     492    \clearpage
     493
     494.. index:: rtems_clock_get_realtime_coarse_timeval()
     495
     496.. _InterfaceRtemsClockGetRealtimeCoarseTimeval:
     497
     498rtems_clock_get_realtime_coarse_timeval()
     499-----------------------------------------
     500
     501Gets the time elapsed since the :term:`Unix epoch` measured using
     502:term:`CLOCK_REALTIME` in coarse precision in seconds and microseconds format.
     503
     504.. rubric:: CALLING SEQUENCE:
     505
     506.. code-block:: c
     507
     508    void rtems_clock_get_realtime_coarse_timeval( struct timeval *time_snapshot );
     509
     510.. rubric:: PARAMETERS:
     511
     512``time_snapshot``
     513    This parameter is the pointer to a `struct timeval
     514    <https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html>`_
     515    object.  The time elapsed since the :term:`Unix epoch` measured using the
     516    :term:`CLOCK_REALTIME` at some time point close to the directive call will
     517    be stored in this object.  Calling the directive with a pointer equal to
     518    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     519    behaviour.
     520
     521.. rubric:: NOTES:
     522
     523The directive does not access a device to get the time.  It uses a recent
     524snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     525:ref:`InterfaceRtemsClockGetRealtimeTimeval` directive may be used to get the
     526time with higher precision and higher runtime overhead.
     527
     528See :ref:`InterfaceRtemsClockGetRealtimeCoarse` and
     529:ref:`InterfaceRtemsClockGetRealtimeCoarseTimeval` to get the time in
     530alternative formats.
     531
     532.. rubric:: CONSTRAINTS:
     533
     534The following constraints apply to this directive:
     535
     536* The directive may be called from within any runtime context.
     537
     538* The directive will not cause the calling task to be preempted.
     539
     540* The directive requires a :term:`Clock Driver`.
     541
     542.. Generated from spec:/rtems/clock/if/get-monotonic
     543
     544.. raw:: latex
     545
     546    \clearpage
     547
     548.. index:: rtems_clock_get_monotonic()
     549
     550.. _InterfaceRtemsClockGetMonotonic:
     551
     552rtems_clock_get_monotonic()
     553---------------------------
     554
     555Gets the time elapsed since some fixed time point in the past measured using
     556the :term:`CLOCK_MONOTONIC` in seconds and nanoseconds format.
     557
     558.. rubric:: CALLING SEQUENCE:
     559
     560.. code-block:: c
     561
     562    void rtems_clock_get_monotonic( struct timespec *time_snapshot );
     563
     564.. rubric:: PARAMETERS:
     565
     566``time_snapshot``
     567    This parameter is the pointer to a :c:type:`bintime` object.  The time
     568    elapsed since some fixed time point in the past measured using the
     569    :term:`CLOCK_MONOTONIC` at some time point during the directive call will
     570    be stored in this object.  Calling the directive with a pointer equal to
     571    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     572    behaviour.
     573
     574.. rubric:: NOTES:
     575
     576The directive accesses a device provided by the :term:`Clock Driver` to get the
     577time in the highest precision available to the system.  Alternatively, the
     578:ref:`InterfaceRtemsClockGetMonotonicCoarse` directive may be used to get the
     579time with less precision and less runtime overhead.
     580
     581See :ref:`InterfaceRtemsClockGetMonotonicBintime`,
     582:ref:`InterfaceRtemsClockGetMonotonicSbintime`, and
     583:ref:`InterfaceRtemsClockGetMonotonicTimeval` to get the time in alternative
     584formats.
     585
     586.. rubric:: CONSTRAINTS:
     587
     588The following constraints apply to this directive:
     589
     590* The directive may be called from within any runtime context.
     591
     592* The directive will not cause the calling task to be preempted.
     593
     594* The directive requires a :term:`Clock Driver`.
     595
     596.. Generated from spec:/rtems/clock/if/get-monotonic-bintime
     597
     598.. raw:: latex
     599
     600    \clearpage
     601
     602.. index:: rtems_clock_get_monotonic_bintime()
     603
     604.. _InterfaceRtemsClockGetMonotonicBintime:
     605
     606rtems_clock_get_monotonic_bintime()
     607-----------------------------------
     608
     609Gets the time elapsed since some fixed time point in the past measured using
     610the :term:`CLOCK_MONOTONIC` in binary time format.
     611
     612.. rubric:: CALLING SEQUENCE:
     613
     614.. code-block:: c
     615
     616    void rtems_clock_get_monotonic_bintime( struct bintime *time_snapshot );
     617
     618.. rubric:: PARAMETERS:
     619
     620``time_snapshot``
     621    This parameter is the pointer to a :c:type:`bintime` object.  The time
     622    elapsed since some fixed time point in the past measured using the
     623    :term:`CLOCK_MONOTONIC` at some time point during the directive call will
     624    be stored in this object.  Calling the directive with a pointer equal to
     625    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     626    behaviour.
     627
     628.. rubric:: NOTES:
     629
     630The directive accesses a device provided by the :term:`Clock Driver` to get the
     631time in the highest precision available to the system.  Alternatively, the
     632:ref:`InterfaceRtemsClockGetMonotonicCoarseBintime` directive may be used to
     633get the time with less precision and less runtime overhead.
     634
     635See :ref:`InterfaceRtemsClockGetMonotonic`,
     636:ref:`InterfaceRtemsClockGetMonotonicSbintime`, and
     637:ref:`InterfaceRtemsClockGetMonotonicTimeval` to get the time in alternative
     638formats.
     639
     640.. rubric:: CONSTRAINTS:
     641
     642The following constraints apply to this directive:
     643
     644* The directive may be called from within any runtime context.
     645
     646* The directive will not cause the calling task to be preempted.
     647
     648* The directive requires a :term:`Clock Driver`.
     649
     650.. Generated from spec:/rtems/clock/if/get-monotonic-sbintime
     651
     652.. raw:: latex
     653
     654    \clearpage
     655
     656.. index:: rtems_clock_get_monotonic_sbintime()
     657
     658.. _InterfaceRtemsClockGetMonotonicSbintime:
     659
     660rtems_clock_get_monotonic_sbintime()
     661------------------------------------
     662
     663Gets the time elapsed since some fixed time point in the past measured using
     664the :term:`CLOCK_MONOTONIC` in signed binary time format.
     665
     666.. rubric:: CALLING SEQUENCE:
     667
     668.. code-block:: c
     669
     670    int64_t rtems_clock_get_monotonic_sbintime( void );
     671
     672.. rubric:: RETURN VALUES:
     673
     674Returns the time elapsed since some fixed time point in the past measured using
     675the :term:`CLOCK_MONOTONIC` at some time point during the directive call.
     676
     677.. rubric:: NOTES:
     678
     679The directive accesses a device provided by the :term:`Clock Driver` to get the
     680time in the highest precision available to the system.
     681
     682See :ref:`InterfaceRtemsClockGetMonotonic`,
     683:ref:`InterfaceRtemsClockGetMonotonicBintime`, and
     684:ref:`InterfaceRtemsClockGetMonotonicTimeval` to get the time in alternative
     685formats.
     686
     687.. rubric:: CONSTRAINTS:
     688
     689The following constraints apply to this directive:
     690
     691* The directive may be called from within any runtime context.
     692
     693* The directive will not cause the calling task to be preempted.
     694
     695* The directive requires a :term:`Clock Driver`.
     696
     697.. Generated from spec:/rtems/clock/if/get-monotonic-timeval
     698
     699.. raw:: latex
     700
     701    \clearpage
     702
     703.. index:: rtems_clock_get_monotonic_timeval()
     704
     705.. _InterfaceRtemsClockGetMonotonicTimeval:
     706
     707rtems_clock_get_monotonic_timeval()
     708-----------------------------------
     709
     710Gets the time elapsed since some fixed time point in the past measured using
     711the :term:`CLOCK_MONOTONIC` in seconds and microseconds format.
     712
     713.. rubric:: CALLING SEQUENCE:
     714
     715.. code-block:: c
     716
     717    void rtems_clock_get_monotonic_timeval( struct timeval *time_snapshot );
     718
     719.. rubric:: PARAMETERS:
     720
     721``time_snapshot``
     722    This parameter is the pointer to a :c:type:`bintime` object.  The time
     723    elapsed since some fixed time point in the past measured using the
     724    :term:`CLOCK_MONOTONIC` at some time point during the directive call will
     725    be stored in this object.  Calling the directive with a pointer equal to
     726    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     727    behaviour.
     728
     729.. rubric:: NOTES:
     730
     731The directive accesses a device provided by the :term:`Clock Driver` to get the
     732time in the highest precision available to the system.  Alternatively, the
     733:ref:`InterfaceRtemsClockGetMonotonicCoarseTimeval` directive may be used to
     734get the time with less precision and less runtime overhead.
     735
     736See :ref:`InterfaceRtemsClockGetMonotonic`,
     737:ref:`InterfaceRtemsClockGetMonotonicBintime`, and
     738:ref:`InterfaceRtemsClockGetMonotonicSbintime` to get the time in alternative
     739formats.
     740
     741.. rubric:: CONSTRAINTS:
     742
     743The following constraints apply to this directive:
     744
     745* The directive may be called from within any runtime context.
     746
     747* The directive will not cause the calling task to be preempted.
     748
     749* The directive requires a :term:`Clock Driver`.
     750
     751.. Generated from spec:/rtems/clock/if/get-monotonic-coarse
     752
     753.. raw:: latex
     754
     755    \clearpage
     756
     757.. index:: rtems_clock_get_monotonic_coarse()
     758
     759.. _InterfaceRtemsClockGetMonotonicCoarse:
     760
     761rtems_clock_get_monotonic_coarse()
     762----------------------------------
     763
     764Gets the time elapsed since some fixed time point in the past measured using
     765the :term:`CLOCK_MONOTONIC` in coarse precision in seconds and nanoseconds
     766format.
     767
     768.. rubric:: CALLING SEQUENCE:
     769
     770.. code-block:: c
     771
     772    void rtems_clock_get_monotonic_coarse( struct timespec *time_snapshot );
     773
     774.. rubric:: PARAMETERS:
     775
     776``time_snapshot``
     777    This parameter is the pointer to a :c:type:`bintime` object.  The time
     778    elapsed since some fixed time point in the past measured using the
     779    :term:`CLOCK_MONOTONIC` at some time point close to the directive call will
     780    be stored in this object.  Calling the directive with a pointer equal to
     781    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     782    behaviour.
     783
     784.. rubric:: NOTES:
     785
     786The directive does not access a device to get the time.  It uses a recent
     787snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     788:ref:`InterfaceRtemsClockGetMonotonic` directive may be used to get the time
     789with higher precision and higher runtime overhead.
     790
     791See :ref:`InterfaceRtemsClockGetMonotonicCoarseBintime` and
     792:ref:`InterfaceRtemsClockGetMonotonicCoarseTimeval` to get the time in
     793alternative formats.
     794
     795.. rubric:: CONSTRAINTS:
     796
     797The following constraints apply to this directive:
     798
     799* The directive may be called from within any runtime context.
     800
     801* The directive will not cause the calling task to be preempted.
     802
     803* The directive requires a :term:`Clock Driver`.
     804
     805.. Generated from spec:/rtems/clock/if/get-monotonic-coarse-bintime
     806
     807.. raw:: latex
     808
     809    \clearpage
     810
     811.. index:: rtems_clock_get_monotonic_coarse_bintime()
     812
     813.. _InterfaceRtemsClockGetMonotonicCoarseBintime:
     814
     815rtems_clock_get_monotonic_coarse_bintime()
     816------------------------------------------
     817
     818Gets the time elapsed since some fixed time point in the past measured using
     819the :term:`CLOCK_MONOTONIC` in coarse precision in binary time format.
     820
     821.. rubric:: CALLING SEQUENCE:
     822
     823.. code-block:: c
     824
     825    void rtems_clock_get_monotonic_coarse_bintime( struct bintime *time_snapshot );
     826
     827.. rubric:: PARAMETERS:
     828
     829``time_snapshot``
     830    This parameter is the pointer to a :c:type:`bintime` object.  The time
     831    elapsed since some fixed time point in the past measured using the
     832    :term:`CLOCK_MONOTONIC` at some time point close to the directive call will
     833    be stored in this object.  Calling the directive with a pointer equal to
     834    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     835    behaviour.
     836
     837.. rubric:: NOTES:
     838
     839The directive does not access a device to get the time.  It uses a recent
     840snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     841:ref:`InterfaceRtemsClockGetMonotonicBintime` directive may be used to get the
     842time with higher precision and higher runtime overhead.
     843
     844See :ref:`InterfaceRtemsClockGetMonotonicCoarse` and
     845:ref:`InterfaceRtemsClockGetMonotonicCoarseTimeval` to get the time in
     846alternative formats.
     847
     848.. rubric:: CONSTRAINTS:
     849
     850The following constraints apply to this directive:
     851
     852* The directive may be called from within any runtime context.
     853
     854* The directive will not cause the calling task to be preempted.
     855
     856* The directive requires a :term:`Clock Driver`.
     857
     858.. Generated from spec:/rtems/clock/if/get-monotonic-coarse-timeval
     859
     860.. raw:: latex
     861
     862    \clearpage
     863
     864.. index:: rtems_clock_get_monotonic_coarse_timeval()
     865
     866.. _InterfaceRtemsClockGetMonotonicCoarseTimeval:
     867
     868rtems_clock_get_monotonic_coarse_timeval()
     869------------------------------------------
     870
     871Gets the time elapsed since some fixed time point in the past measured using
     872the :term:`CLOCK_MONOTONIC` in coarse precision in seconds and microseconds
     873format.
     874
     875.. rubric:: CALLING SEQUENCE:
     876
     877.. code-block:: c
     878
     879    void rtems_clock_get_monotonic_coarse_timeval( struct timeval *time_snapshot );
     880
     881.. rubric:: PARAMETERS:
     882
     883``time_snapshot``
     884    This parameter is the pointer to a :c:type:`bintime` object.  The time
     885    elapsed since some fixed time point in the past measured using the
     886    :term:`CLOCK_MONOTONIC` at some time point close to the directive call will
     887    be stored in this object.  Calling the directive with a pointer equal to
     888    `NULL <https://en.cppreference.com/w/c/types/NULL>`_ is undefined
     889    behaviour.
     890
     891.. rubric:: NOTES:
     892
     893The directive does not access a device to get the time.  It uses a recent
     894snapshot provided by the :term:`Clock Driver`.  Alternatively, the
     895:ref:`InterfaceRtemsClockGetMonotonicTimeval` directive may be used to get the
     896time with higher precision and higher runtime overhead.
     897
     898See :ref:`InterfaceRtemsClockGetMonotonicCoarse` and
     899:ref:`InterfaceRtemsClockGetMonotonicCoarseBintime` to get the time in
     900alternative formats.
     901
     902.. rubric:: CONSTRAINTS:
     903
     904The following constraints apply to this directive:
     905
     906* The directive may be called from within any runtime context.
     907
     908* The directive will not cause the calling task to be preempted.
     909
     910* The directive requires a :term:`Clock Driver`.
     911
     912.. Generated from spec:/rtems/clock/if/get-boot-time
     913
     914.. raw:: latex
     915
     916    \clearpage
     917
     918.. index:: rtems_clock_get_boot_time()
     919
     920.. _InterfaceRtemsClockGetBootTime:
     921
     922rtems_clock_get_boot_time()
     923---------------------------
     924
     925Gets the time elapsed since the :term:`Unix epoch` at some time point during
     926system initialization in seconds and nanoseconds format.
     927
     928.. rubric:: CALLING SEQUENCE:
     929
     930.. code-block:: c
     931
     932    void rtems_clock_get_boot_time( struct timespec *boot_time );
     933
     934.. rubric:: PARAMETERS:
     935
     936``boot_time``
     937    This parameter is the pointer to a `struct timespec
     938    <https://en.cppreference.com/w/c/chrono/timespec>`_ object.  The time
     939    elapsed since the :term:`Unix epoch` at some time point during system
     940    initialization call will be stored in this object.  Calling the directive
     941    with a pointer equal to `NULL
     942    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     943
     944.. rubric:: NOTES:
     945
     946See :ref:`InterfaceRtemsClockGetBootTimeBintime` and
     947:ref:`InterfaceRtemsClockGetBootTimeTimeval` to get the boot time in
     948alternative formats.  Setting the :term:`CLOCK_REALTIME` will also set the boot
     949time.
     950
     951.. rubric:: CONSTRAINTS:
     952
     953The following constraints apply to this directive:
     954
     955* The directive may be called from within any runtime context.
     956
     957* The directive will not cause the calling task to be preempted.
     958
     959* The directive requires a :term:`Clock Driver`.
     960
     961.. Generated from spec:/rtems/clock/if/get-boot-time-bintime
     962
     963.. raw:: latex
     964
     965    \clearpage
     966
     967.. index:: rtems_clock_get_boot_time_bintime()
     968
     969.. _InterfaceRtemsClockGetBootTimeBintime:
     970
     971rtems_clock_get_boot_time_bintime()
     972-----------------------------------
     973
     974Gets the time elapsed since the :term:`Unix epoch` at some time point during
     975system initialization in binary time format.
     976
     977.. rubric:: CALLING SEQUENCE:
     978
     979.. code-block:: c
     980
     981    void rtems_clock_get_boot_time_bintime( struct bintime *boot_time );
     982
     983.. rubric:: PARAMETERS:
     984
     985``boot_time``
     986    This parameter is the pointer to a :c:type:`bintime` object.  The time
     987    elapsed since the :term:`Unix epoch` at some time point during system
     988    initialization call will be stored in this object.  Calling the directive
     989    with a pointer equal to `NULL
     990    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     991
     992.. rubric:: NOTES:
     993
     994See :ref:`InterfaceRtemsClockGetBootTime` and
     995:ref:`InterfaceRtemsClockGetBootTimeTimeval` to get the boot time in
     996alternative formats.  Setting the :term:`CLOCK_REALTIME` will also set the boot
     997time.
     998
     999.. rubric:: CONSTRAINTS:
     1000
     1001The following constraints apply to this directive:
     1002
     1003* The directive may be called from within any runtime context.
     1004
     1005* The directive will not cause the calling task to be preempted.
     1006
     1007* The directive requires a :term:`Clock Driver`.
     1008
     1009.. Generated from spec:/rtems/clock/if/get-boot-time-timeval
     1010
     1011.. raw:: latex
     1012
     1013    \clearpage
     1014
     1015.. index:: rtems_clock_get_boot_time_timeval()
     1016
     1017.. _InterfaceRtemsClockGetBootTimeTimeval:
     1018
     1019rtems_clock_get_boot_time_timeval()
     1020-----------------------------------
     1021
     1022Gets the time elapsed since the :term:`Unix epoch` at some time point during
     1023system initialization in seconds and microseconds format.
     1024
     1025.. rubric:: CALLING SEQUENCE:
     1026
     1027.. code-block:: c
     1028
     1029    void rtems_clock_get_boot_time_timeval( struct timeval *boot_time );
     1030
     1031.. rubric:: PARAMETERS:
     1032
     1033``boot_time``
     1034    This parameter is the pointer to a `struct timeval
     1035    <https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/time.h.html>`_
     1036    object.  The time elapsed since the :term:`Unix epoch` at some time point
     1037    during system initialization call will be stored in this object.  Calling
     1038    the directive with a pointer equal to `NULL
     1039    <https://en.cppreference.com/w/c/types/NULL>`_ is undefined behaviour.
     1040
     1041.. rubric:: NOTES:
     1042
     1043See :ref:`InterfaceRtemsClockGetBootTime` and
     1044:ref:`InterfaceRtemsClockGetBootTimeBintime` to get the boot time in
     1045alternative formats.  Setting the :term:`CLOCK_REALTIME` will also set the boot
     1046time.
     1047
     1048.. rubric:: CONSTRAINTS:
     1049
     1050The following constraints apply to this directive:
     1051
     1052* The directive may be called from within any runtime context.
     1053
     1054* The directive will not cause the calling task to be preempted.
     1055
     1056* The directive requires a :term:`Clock Driver`.
     1057
    2231058.. Generated from spec:/rtems/clock/if/get-seconds-since-epoch
    2241059
  • c-user/clock/introduction.rst

    r61410da r38ec48d  
    3030.. spec:/rtems/clock/if/get-tod
    3131.. spec:/rtems/clock/if/get-tod-timeval
     32.. spec:/rtems/clock/if/get-realtime
     33.. spec:/rtems/clock/if/get-realtime-bintime
     34.. spec:/rtems/clock/if/get-realtime-timeval
     35.. spec:/rtems/clock/if/get-realtime-coarse
     36.. spec:/rtems/clock/if/get-realtime-coarse-bintime
     37.. spec:/rtems/clock/if/get-realtime-coarse-timeval
     38.. spec:/rtems/clock/if/get-monotonic
     39.. spec:/rtems/clock/if/get-monotonic-bintime
     40.. spec:/rtems/clock/if/get-monotonic-sbintime
     41.. spec:/rtems/clock/if/get-monotonic-timeval
     42.. spec:/rtems/clock/if/get-monotonic-coarse
     43.. spec:/rtems/clock/if/get-monotonic-coarse-bintime
     44.. spec:/rtems/clock/if/get-monotonic-coarse-timeval
     45.. spec:/rtems/clock/if/get-boot-time
     46.. spec:/rtems/clock/if/get-boot-time-bintime
     47.. spec:/rtems/clock/if/get-boot-time-timeval
    3248.. spec:/rtems/clock/if/get-seconds-since-epoch
    3349.. spec:/rtems/clock/if/get-ticks-per-second
     
    5268* :ref:`InterfaceRtemsClockGetTodTimeval` - Gets the seconds and microseconds
    5369  elapsed since the :term:`Unix epoch` and the current :term:`CLOCK_REALTIME`.
     70
     71* :ref:`InterfaceRtemsClockGetRealtime` - Gets the time elapsed since the
     72  :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in seconds and
     73  nanoseconds format.
     74
     75* :ref:`InterfaceRtemsClockGetRealtimeBintime` - Gets the time elapsed since
     76  the :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in binary time
     77  format.
     78
     79* :ref:`InterfaceRtemsClockGetRealtimeTimeval` - Gets the time elapsed since
     80  the :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in seconds and
     81  microseconds format.
     82
     83* :ref:`InterfaceRtemsClockGetRealtimeCoarse` - Gets the time elapsed since the
     84  :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in coarse precision
     85  in seconds and nanoseconds format.
     86
     87* :ref:`InterfaceRtemsClockGetRealtimeCoarseBintime` - Gets the time elapsed
     88  since the :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in coarse
     89  precision in binary time format.
     90
     91* :ref:`InterfaceRtemsClockGetRealtimeCoarseTimeval` - Gets the time elapsed
     92  since the :term:`Unix epoch` measured using :term:`CLOCK_REALTIME` in coarse
     93  precision in seconds and microseconds format.
     94
     95* :ref:`InterfaceRtemsClockGetMonotonic` - Gets the time elapsed since some
     96  fixed time point in the past measured using the :term:`CLOCK_MONOTONIC` in
     97  seconds and nanoseconds format.
     98
     99* :ref:`InterfaceRtemsClockGetMonotonicBintime` - Gets the time elapsed since
     100  some fixed time point in the past measured using the :term:`CLOCK_MONOTONIC`
     101  in binary time format.
     102
     103* :ref:`InterfaceRtemsClockGetMonotonicSbintime` - Gets the time elapsed since
     104  some fixed time point in the past measured using the :term:`CLOCK_MONOTONIC`
     105  in signed binary time format.
     106
     107* :ref:`InterfaceRtemsClockGetMonotonicTimeval` - Gets the time elapsed since
     108  some fixed time point in the past measured using the :term:`CLOCK_MONOTONIC`
     109  in seconds and microseconds format.
     110
     111* :ref:`InterfaceRtemsClockGetMonotonicCoarse` - Gets the time elapsed since
     112  some fixed time point in the past measured using the :term:`CLOCK_MONOTONIC`
     113  in coarse precision in seconds and nanoseconds format.
     114
     115* :ref:`InterfaceRtemsClockGetMonotonicCoarseBintime` - Gets the time elapsed
     116  since some fixed time point in the past measured using the
     117  :term:`CLOCK_MONOTONIC` in coarse precision in binary time format.
     118
     119* :ref:`InterfaceRtemsClockGetMonotonicCoarseTimeval` - Gets the time elapsed
     120  since some fixed time point in the past measured using the
     121  :term:`CLOCK_MONOTONIC` in coarse precision in seconds and microseconds
     122  format.
     123
     124* :ref:`InterfaceRtemsClockGetBootTime` - Gets the time elapsed since the
     125  :term:`Unix epoch` at some time point during system initialization in seconds
     126  and nanoseconds format.
     127
     128* :ref:`InterfaceRtemsClockGetBootTimeBintime` - Gets the time elapsed since
     129  the :term:`Unix epoch` at some time point during system initialization in
     130  binary time format.
     131
     132* :ref:`InterfaceRtemsClockGetBootTimeTimeval` - Gets the time elapsed since
     133  the :term:`Unix epoch` at some time point during system initialization in
     134  seconds and microseconds format.
    54135
    55136* :ref:`InterfaceRtemsClockGetSecondsSinceEpoch` - Gets the seconds elapsed
Note: See TracChangeset for help on using the changeset viewer.