Changeset bfddb047 in rtems


Ignore:
Timestamp:
Nov 16, 2012, 1:02:12 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, master
Children:
90733a86
Parents:
62181b21
git-author:
Sebastian Huber <sebastian.huber@…> (11/16/12 13:02:12)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/21/12 15:29:36)
Message:

rtems: Add rtems_clock_get_uptime_timeval()

Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/Makefile.am

    r62181b21 rbfddb047  
    155155librtems_a_SOURCES += src/clockgettodtimeval.c
    156156librtems_a_SOURCES += src/clockgetuptime.c
     157librtems_a_SOURCES += src/clockgetuptimetimeval.c
    157158librtems_a_SOURCES += src/clockset.c
    158159librtems_a_SOURCES += src/clocksetnsecshandler.c
  • cpukit/rtems/include/rtems/rtems/clock.h

    r62181b21 rbfddb047  
    229229
    230230/**
     231 *  @brief Gets the system uptime in the struct timeval format.
     232 *
     233 *  @param[out] Returns the system uptime.  Pointer must not be NULL.
     234 */
     235void rtems_clock_get_uptime_timeval( struct timeval *uptime );
     236
     237/**
    231238 *  @brief _TOD_Validate
    232239 *
  • doc/user/clock.t

    r62181b21 rbfddb047  
    2323@item @code{@value{DIRPREFIX}clock_get_ticks_since_boot} - Get ticks since boot
    2424@item @code{@value{DIRPREFIX}clock_get_uptime} - Get time since boot
     25@item @code{@value{DIRPREFIX}clock_get_uptime_timeval} - Get time since boot in timeval format
    2526@item @code{@value{DIRPREFIX}clock_set_nanoseconds_extension} - Install the nanoseconds since last tick handler
    2627@item @code{@value{DIRPREFIX}clock_tick} - Announce a clock tick
     
    666667This directive may be called from an ISR.
    667668
     669@c
     670@c
     671@c
     672@page
     673@subsection CLOCK_GET_UPTIME_TIMEVAL - Get the time since boot in timeval format
     674
     675@cindex clock get uptime
     676@cindex uptime
     677
     678@subheading CALLING SEQUENCE:
     679
     680@ifset is-C
     681@findex rtems_clock_get_uptime_timeval
     682@example
     683void rtems_clock_get_uptime_timeval(
     684  struct timeval *uptime
     685);
     686@end example
     687@end ifset
     688
     689@subheading DIRECTIVE STATUS CODES:
     690
     691NONE
     692
     693@subheading DESCRIPTION:
     694
     695This directive returns the seconds and microseconds since the
     696system was booted.  If the BSP supports nanosecond clock
     697accuracy, the time reported will probably be different on every
     698call.
     699
     700@subheading NOTES:
     701
     702This directive may be called from an ISR.
    668703
    669704@c
  • testsuites/sptests/sp09/screen02.c

    r62181b21 rbfddb047  
    8484  );
    8585
     86  puts( "TA1 - rtems_clock_get_uptime_timeval" );
     87  rtems_clock_get_uptime_timeval( &tv );
     88
    8689  puts( "TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS" );
    8790  status = rtems_clock_get_tod_timeval( NULL );
  • testsuites/sptests/sp09/sp09.scn

    r62181b21 rbfddb047  
    3232TA1 - rtems_clock_get_seconds_since_epoch - RTEMS_NOT_DEFINED
    3333TA1 - rtems_clock_get_uptime - RTEMS_INVALID_ADDRESS
     34TA1 - rtems_clock_get_uptime_timeval
    3435TA1 - rtems_clock_get_tod_timeval - RTEMS_INVALID_ADDRESS
    3536TA1 - rtems_clock_get_tod_timeval - RTEMS_NOT_DEFINED
Note: See TracChangeset for help on using the changeset viewer.