From 718d4d23add4d124257af63c46491e1c30cfbe4e Mon Sep 17 00:00:00 2001
From: Gregory Nutt User's Manual by Gregory Nutt
- Last Updated: June 2, 2015 Last Updated: June 12, 2015
Returned Value:
-
If successful, the
@@ -3941,14 +3940,9 @@ interface of the same name.
Returned Value:
-
If successful, the
@@ -3969,14 +3963,9 @@ interface of the same name.
Returned Value:
-
If successful, the
@@ -3997,14 +3986,9 @@ interface of the same name.
Returned Value:
-
If successful, the
@@ -4012,80 +3996,241 @@ interface of the same name.
Description:
+ Represents GMT date/time in a type
Input Parameters:
Returned Value:
-
- If successful, the
+ Description:
+ Represents local date/time in a type
+ Input Parameters:
+
+ Returned Value:
+ Returned Value:
+ If successful, the
+ Function Prototype:
+
+ Description:
+
+ Input Parameters:
+
+ Returned Value:
+ If successful, the
+ Function Prototype:
+
+ Description:
+
+ Input Parameters:
+
+ Returned Value:
+ If successful, the
Function Prototype:
Description:
+ Represents GMT date/time in a type
Input Parameters:
Returned Value:
-
If successful, the
+ Description:
+ Represents local date/time in a type
+ Input Parameters:
+
+ Returned Value:
+ Returned Value:
+ If successful, the
+ Function Prototype:
+
+ Description:
+
+ Input Parameters:
+
+ Returned Value:
+ If successful, the
+ Function Prototype:
+
+ Description:
+
+ Input Parameters:
+
+ Returned Value:
+ If successful, the
Function Prototype:
Returned Value:
-
If the call succeeds,
Function Prototype:
Returned Value:
-
If successful, the
Function Prototype:
Returned Value:
-
If the timer_gettime() succeeds, a value of 0 (
Function Prototype:
Returned Value:
-
If successful, the NuttX Operating System
2.6.1 clock_settime
@@ -3913,14 +3917,9 @@ interface of the same name.
clock_settime() function will return zero (OK).
Otherwise, an non-zero error number will be returned to indicate the error:
-
To be provided.2.6.2 clock_gettime
clock_gettime() function will return zero (OK).
Otherwise, an non-zero error number will be returned to indicate the error:
-
To be provided.2.6.3 clock_getres
clock_getres() function will return zero (OK).
Otherwise, an non-zero error number will be returned to indicate the error:
-
To be provided.2.6.4 mktime
mktime() function will return zero (OK).
Otherwise, an non-zero error number will be returned to indicate the error:
-
To be provided.2.6.5 gmtime
#include <time.h>
- struct tm *gmtime(const time_t *clock);
+ FAR struct tm *gmtime(FAR const time_t *timep);
struct tm.
+ This function is not re-entrant.
-
clock.
- Represents calendar time.
- This is an absolute time value representing the number of seconds elapsed since 00:00:00
- on January 1, 1970, Coordinated Universal Time (UTC).
+ timep.
+ Represents GMT calendar time.
+ This is an absolute time value representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
gmtime() function will return the pointer to a statically
- defined instance of struct tim.
+ If successful, the gmtime() function will return the pointer to a statically defined instance of struct tm.
Otherwise, a NULL will be returned to indicate the error:
-
To be provided.2.6.6 localtime
-
- #include <time.h>
- #define localtime(c) gmtime(c)
-
+
+#include <time.h>
+#ifdef CONFIG_LIBC_LOCALTIME
+# define localtime(c) gmtime(c)
+#else
+FAR struct tm *localtime(FAR const time_t *timep);
+#endif
+
+struct tm.
+ This function is not re-entrant.
+
+
+timep.
+ Represents GMT calendar time.
+ This is an absolute time value representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
+localtime() function will return the pointer to a statically defined instance of struct tm.
+ Otherwise, a NULL will be returned to indicate the error:
+2.6.7 gmtime_r
+2.6.7 asctime
+
+#include <time.h>
+#ifdef CONFIG_TIME_EXTENDED
+FAR char *asctime(FAR const struct tm *tp);
+#endif
+
+asctime() convert the time provided in a struct tm to a string representation.
+ asctime() is not re-entrant.
+
+
+tp.
+ Pointer to the time to be converted.
+ asctime() function will return a pointer to a statically defined string holding the converted time.
+ Otherwise, a NULL will be returned to indicate the error.
+2.6.8 ctime
+
+#include <time.h>
+#ifdef CONFIG_TIME_EXTENDED
+FAR char *ctime(FAR const time_t *timep);
+#endif
+
+ctime() converts the time provided in seconds since the epoch to a string representation.
+ ctime() is not re-entrant.
+
+
+timep.
+ The current time represented as seconds since the epoch.
+ ctime() function will return the pointer to the converted string.
+ Otherwise, a NULL will be returned to indicate the error.
+2.6.9 gmtime_r
#include <time.h>
- struct tm *gmtime_r(const time_t *clock, struct tm *result);
+ struct tm *gmtime_r(const time_t *timep, struct tm *result);
struct tm.
+ This function is re-entrant.
-
clock.
- Represents calendar time.
- This is an absolute time value representing the number of seconds elapsed since 00:00:00
- on January 1, 1970, Coordinated Universal Time (UTC).
+ timep.
+ Represents GMT calendar time.
+ This is an absolute time value representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
result.
A user-provided buffer to receive the converted time structure.
gmtime_r() function will return the pointer, result,
provided by the caller.
Otherwise, a NULL will be returned to indicate the error:
2.6.10 localtime_r
+
+#include <time.h>
+#ifdef CONFIG_LIBC_LOCALTIME
+# define localtime_r(c,r) gmtime_r(c,r)
+#else
+FAR struct tm *localtime_r(FAR const time_t *timep, FAR struct tm *result);
+#endif
+
+struct tm.
+ This function is re-entrant.
+
-
+To be provided.timep.
+ Represents GMT calendar time.
+ This is an absolute time value representing the number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC).
+ result.
+ A user-provided buffer to receive the converted time structure.
localtime_r() function will return the pointer, result,
+ provided by the caller.
+ Otherwise, a NULL will be returned to indicate the error:
+2.6.8 localtime_r
-
- #include <time.h>
- #define localtime_r(c,r) gmtime_r(c,r)
-
+2.6.11 asctime_r
+
+#include <time.h>
+#ifdef CONFIG_TIME_EXTENDED
+FAR char *asctime_r(FAR const struct tm *tp, FAR char *buf);
+#endif
+
+asctime_r() converts the time provided in a struct tm to a string representation.
+ asctime-r() is re-entrant.
+
+
+tp.
+ Pointer to the time to be converted.
+ buf.
+ The user provider buffer. of size >= 26 characters, to receive the converted time.
+ asctime_r() function will return the pointer, buf, provided by the caller.
+ Otherwise, a NULL will be returned to indicate the error.
+2.6.9 timer_create
+2.6.12 ctime_r
+
+#include <time.h>
+#ifdef CONFIG_TIME_EXTENDED
+#endif
+
+ctime_r() converts the time provided in seconds since the epoch to a string representation.
+ ctime() is re-entrant.
+
+
+timep.
+ The current time represented as seconds since the epoch.
+ buf.
+ The user provider buffer. of size >= 26 characters, to receive the converted time.
+ ctime_r() function will return the pointer, buf, provided by the caller.
+ Otherwise, a NULL will be returned to indicate the error.
+2.6.13 timer_create
timer_create() will return 0 (OK) and update the
location referenced by timerid to a timer_t, which can be passed to the
other per-thread timer calls. If an error occurs, the function will return
@@ -4155,7 +4298,7 @@ interface of the same name.
CLOCK_REALTIME is supported for the clockid argument.2.6.10 timer_delete
+2.6.14 timer_delete
timer_delete() function will return zero (OK).
Otherwise, the function will return a value of -1 (ERROR) and set
errno to indicate the error:
@@ -4194,7 +4335,7 @@ interface of the same name.
Comparable to the POSIX interface of the same name.
2.6.11 timer_settime
+2.6.15 timer_settime
OK) will be returned.
If an error occurs, the value -1 (ERROR) will be returned, and
errno set to indicate the error.
@@ -4277,7 +4416,7 @@ interface of the same name.
ovalue argument is ignored.2.6.12 timer_gettime
+2.6.16 timer_gettime
timer_gettime() function will return zero (OK).
Otherwise, an non-zero error number will be returned to indicate the error:
Function Prototype:
@@ -4385,7 +4522,7 @@ interface of the same name. interface of the same name. -Function Prototype:
@@ -9754,6 +9891,8 @@ notify a task when a message is available on a queue.