RTEMS
clockgetuptime.c
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2007.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21 
22 #include <rtems/rtems/clock.h>
23 #include <rtems/score/todimpl.h>
24 
25 /*
26  * rtems_clock_get_uptime
27  *
28  * This directive obtains the system uptime. A timestamp is the seconds
29  * and nanoseconds since boot.
30  *
31  * Input parameters:
32  * timestamp - pointer to the timestamp
33  *
34  * Output parameters:
35  * *uptime - filled in
36  * RTEMS_SUCCESSFUL - if successful
37  * error code - if unsuccessful
38  */
40  struct timespec *uptime
41 )
42 {
43  if ( !uptime )
44  return RTEMS_INVALID_ADDRESS;
45 
47  return RTEMS_SUCCESSFUL;
48 }
This header file defines the Clock Manager API.
This status code indicates successful completion.
Definition: status.h:86
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
Time of Day Handler API.
This status code indicates that a specified address was invalid.
Definition: status.h:133
rtems_status_code rtems_clock_get_uptime(struct timespec *uptime)
%
static void _TOD_Get_zero_based_uptime_as_timespec(struct timespec *time)
Gets the system uptime with potential accuracy to the nanosecond.
Definition: todimpl.h:259