Match unix port definition of sys_now to lwIP core definition

This commit is contained in:
kieranm 2009-03-25 11:01:00 +00:00
parent 0f06910f66
commit 5c39901bdc

View File

@ -491,17 +491,16 @@ sys_sem_free(struct sys_sem *sem)
} }
} }
/*-----------------------------------------------------------------------------------*/ /*-----------------------------------------------------------------------------------*/
unsigned long u32_t
sys_now(void) sys_now(void)
{ {
struct timeval tv; struct timeval tv;
struct timezone tz; struct timezone tz;
long sec, usec; u32_t sec, usec, msec;
unsigned long msec;
gettimeofday(&tv, &tz); gettimeofday(&tv, &tz);
sec = tv.tv_sec - starttime.tv_sec; sec = (u32_t)(tv.tv_sec - starttime.tv_sec);
usec = tv.tv_usec - starttime.tv_usec; usec = (u32_t)(tv.tv_usec - starttime.tv_usec);
msec = sec * 1000 + usec / 1000; msec = sec * 1000 + usec / 1000;
return msec; return msec;