source: rtems/cpukit/rtems/src/clockgetuptime.c @ 4efe1955

4.115
Last change on this file since 4efe1955 was 4efe1955, checked in by Mathew Kallada <matkallada@…>, on 12/06/12 at 00:46:05

rtems misc: Clean up Doxygen GCI Task #5

http://www.google-melange.com/gci/task/view/google/gci2012/8015207

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/**
2 * @file
3 *
4 * @brief Obtain the System Uptime
5 * @ingroup ClassicClock Clocks
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <rtems/system.h>
22#include <rtems/rtems/status.h>
23#include <rtems/rtems/clock.h>
24#include <rtems/score/isr.h>
25#include <rtems/score/thread.h>
26#include <rtems/score/timestamp.h>
27#include <rtems/score/tod.h>
28#include <rtems/score/watchdog.h>
29
30/*
31 *  rtems_clock_get_uptime
32 *
33 *  This directive obtains the system uptime.  A timestamp is the seconds
34 *  and nanoseconds since boot.
35 *
36 *  Input parameters:
37 *    timestamp - pointer to the timestamp
38 *
39 *  Output parameters:
40 *    *uptime           - filled in
41 *    RTEMS_SUCCESSFUL - if successful
42 *    error code       - if unsuccessful
43 */
44rtems_status_code rtems_clock_get_uptime(
45  struct timespec *uptime
46)
47{
48  if ( !uptime )
49    return RTEMS_INVALID_ADDRESS;
50
51  _TOD_Get_uptime_as_timespec( uptime );
52  return RTEMS_SUCCESSFUL;
53}
Note: See TracBrowser for help on using the repository browser.