summaryrefslogtreecommitdiff
path: root/nuttx/sched/clock_getres.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/sched/clock_getres.c')
-rw-r--r--nuttx/sched/clock_getres.c59
1 files changed, 31 insertions, 28 deletions
diff --git a/nuttx/sched/clock_getres.c b/nuttx/sched/clock_getres.c
index 821941ba2..467802f27 100644
--- a/nuttx/sched/clock_getres.c
+++ b/nuttx/sched/clock_getres.c
@@ -1,7 +1,7 @@
-/************************************************************
- * clock_getres.c
+/************************************************************************
+ * sched/clock_getres.c
*
- * Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -31,62 +31,65 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Included Files
- ************************************************************/
+ ************************************************************************/
-#include <sys/types.h>
+#include <nuttx/config.h>
+
+#include <stdint.h>
#include <time.h>
#include <errno.h>
#include <debug.h>
+
#include "clock_internal.h"
-/************************************************************
+/************************************************************************
* Definitions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Type Declarations
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Private Function Prototypes
- ************************************************************/
+ ************************************************************************/
-/**********************************************************
+/**********************************************************************
* Public Constant Data
- **********************************************************/
+ **********************************************************************/
-/************************************************************
+/************************************************************************
* Public Variables
- ************************************************************/
+ ************************************************************************/
-/**********************************************************
+/**********************************************************************
* Private Variables
- **********************************************************/
+ **********************************************************************/
-/************************************************************
+/************************************************************************
* Private Functions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Public Functions
- ************************************************************/
+ ************************************************************************/
-/************************************************************
+/************************************************************************
* Function: clock_getres
*
* Description:
* Clock Functions based on POSIX APIs
*
- ************************************************************/
+ ************************************************************************/
int clock_getres(clockid_t clock_id, struct timespec *res)
{
- uint32 time_res;
- int ret = OK;
+ uint32_t time_res;
+ int ret = OK;
sdbg("clock_id=%d\n", clock_id);