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)
{
struct timeval tv;
struct timezone tz;
long sec, usec;
unsigned long msec;
u32_t sec, usec, msec;
gettimeofday(&tv, &tz);
sec = tv.tv_sec - starttime.tv_sec;
usec = tv.tv_usec - starttime.tv_usec;
sec = (u32_t)(tv.tv_sec - starttime.tv_sec);
usec = (u32_t)(tv.tv_usec - starttime.tv_usec);
msec = sec * 1000 + usec / 1000;
return msec;