Changeset 433 for pjproject/trunk/pjlib/src/pj/os_time_unix.c
- Timestamp:
- May 10, 2006 7:24:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/os_time_unix.c
r338 r433 18 18 */ 19 19 #include <pj/os.h> 20 #include <pj/errno.h> 20 21 #include <pj/compat/time.h> 21 22 … … 24 25 #endif 25 26 27 #include <errno.h> 28 26 29 /////////////////////////////////////////////////////////////////////////////// 27 30 28 31 PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *p_tv) 29 32 { 30 struct timeval tv; 33 struct timeval the_time; 34 int rc; 31 35 32 36 PJ_CHECK_STACK(); 33 37 34 gettimeofday(&tv, NULL); 35 p_tv->sec = tv.tv_sec; 36 p_tv->msec = tv.tv_usec / 1000; 38 rc = gettimeofday(&the_time, NULL); 39 if (rc != 0) 40 return PJ_RETURN_OS_ERROR(pj_get_native_os_error()); 41 42 p_tv->sec = the_time.tv_sec; 43 p_tv->msec = the_time.tv_usec / 1000; 37 44 return PJ_SUCCESS; 38 45 }
Note: See TracChangeset
for help on using the changeset viewer.