Ignore:
Timestamp:
May 10, 2006 7:24:40 PM (17 years ago)
Author:
bennylp
Message:

Merge-in RTEMS port patch by Phil Torre <ptorre@…>, alpha release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/os_time_unix.c

    r338 r433  
    1818 */ 
    1919#include <pj/os.h> 
     20#include <pj/errno.h> 
    2021#include <pj/compat/time.h> 
    2122 
     
    2425#endif 
    2526 
     27#include <errno.h> 
     28 
    2629/////////////////////////////////////////////////////////////////////////////// 
    2730 
    2831PJ_DEF(pj_status_t) pj_gettimeofday(pj_time_val *p_tv) 
    2932{ 
    30     struct timeval tv; 
     33    struct timeval the_time; 
     34    int rc; 
    3135 
    3236    PJ_CHECK_STACK(); 
    3337 
    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; 
    3744    return PJ_SUCCESS; 
    3845} 
Note: See TracChangeset for help on using the changeset viewer.