modify argument name of gettimeofday
authorsunghan <sh924.chang@samsung.com>
Thu, 8 Jun 2017 04:49:06 +0000 (13:49 +0900)
committersunghan <sh924.chang@samsung.com>
Thu, 8 Jun 2017 04:49:06 +0000 (13:49 +0900)
In POSIX, tv and tz are used.

os/include/sys/time.h
os/kernel/clock/clock_gettimeofday.c

index 6bde1a4..99f5bfa 100644 (file)
@@ -89,7 +89,7 @@ extern "C" {
  * @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)
index cef1b4a..315f891 100644 (file)
  *
  ****************************************************************************/
 
-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;
        }
@@ -120,8 +120,8 @@ int gettimeofday(struct timeval *tp, FAR struct timezone *tzp)
        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;