Changeset 90733a86 in rtems


Ignore:
Timestamp:
Nov 16, 2012, 1:14:03 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
94eb1bb
Parents:
bfddb047
git-author:
Sebastian Huber <sebastian.huber@…> (11/16/12 13:14:03)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/12 15:29:40)
Message:

rtems: Add rtems_clock_get_uptime_seconds()

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    rbfddb047 r90733a86  
    156156librtems_a_SOURCES += src/clockgetuptime.c
    157157librtems_a_SOURCES += src/clockgetuptimetimeval.c
     158librtems_a_SOURCES += src/clockgetuptimeseconds.c
    158159librtems_a_SOURCES += src/clockset.c
    159160librtems_a_SOURCES += src/clocksetnsecshandler.c
  • cpukit/rtems/include/rtems/rtems/clock.h

    rbfddb047 r90733a86  
    236236
    237237/**
     238 *  @brief Returns the system uptime in seconds.
     239 *
     240 *  @return The system uptime in seconds.
     241 */
     242time_t rtems_clock_get_uptime_seconds( void );
     243
     244/**
    238245 *  @brief _TOD_Validate
    239246 *
  • doc/user/clock.t

    rbfddb047 r90733a86  
    2424@item @code{@value{DIRPREFIX}clock_get_uptime} - Get time since boot
    2525@item @code{@value{DIRPREFIX}clock_get_uptime_timeval} - Get time since boot in timeval format
     26@item @code{@value{DIRPREFIX}clock_get_uptime_seconds} - Get seconds since boot
    2627@item @code{@value{DIRPREFIX}clock_set_nanoseconds_extension} - Install the nanoseconds since last tick handler
    2728@item @code{@value{DIRPREFIX}clock_tick} - Announce a clock tick
     
    706707@c
    707708@page
     709@subsection CLOCK_GET_UPTIME_SECONDS - Get the seconds since boot
     710
     711@cindex clock get uptime
     712@cindex uptime
     713
     714@subheading CALLING SEQUENCE:
     715
     716@ifset is-C
     717@findex rtems_clock_get_uptime_seconds
     718@example
     719time_t rtems_clock_get_uptime_seconds(void);
     720@end example
     721@end ifset
     722
     723@subheading DIRECTIVE STATUS CODES:
     724
     725The system uptime in seconds.
     726
     727@subheading DESCRIPTION:
     728
     729This directive returns the seconds since the system was booted.
     730
     731@subheading NOTES:
     732
     733This directive may be called from an ISR.
     734
     735@c
     736@c
     737@c
     738@page
    708739@subsection CLOCK_SET_NANOSECONDS_EXTENSION - Install the nanoseconds since last tick handler
    709740
  • testsuites/sptests/sp09/screen02.c

    rbfddb047 r90733a86  
    8787  rtems_clock_get_uptime_timeval( &tv );
    8888
     89  puts( "TA1 - rtems_clock_get_uptime_seconds" );
     90  rtems_clock_get_uptime_seconds();
     91
    8992  puts( "TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS" );
    9093  status = rtems_clock_get_tod_timeval( NULL );
  • testsuites/sptests/sp09/sp09.scn

    rbfddb047 r90733a86  
    3333TA1 - rtems_clock_get_uptime - RTEMS_INVALID_ADDRESS
    3434TA1 - rtems_clock_get_uptime_timeval
     35TA1 - rtems_clock_get_uptime_seconds
    3536TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS
    3637TA1 - rtems_clock_get_tod_timeval - RTEMS_NOT_DEFINED
Note: See TracChangeset for help on using the changeset viewer.