In POSIX, tv and tz are used.
* @brief POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
* @since Tizen RT v1.0
*/
-EXTERN int gettimeofday(struct timeval *tp, FAR struct timezone *tzp);
+EXTERN int gettimeofday(struct timeval *tv, FAR struct timezone *tz);
#undef EXTERN
#if defined(__cplusplus)
*
****************************************************************************/
-int gettimeofday(struct timeval *tp, FAR struct timezone *tzp)
+int gettimeofday(struct timeval *tv, FAR struct timezone *tz)
{
struct timespec ts;
int ret;
#ifdef CONFIG_DEBUG
- if (!tp) {
+ if (!tv) {
set_errno(EINVAL);
return ERROR;
}
if (ret == OK) {
/* Convert the struct timespec to a struct timeval */
- tp->tv_sec = ts.tv_sec;
- tp->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
+ tv->tv_sec = ts.tv_sec;
+ tv->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
}
return ret;