Re: [PATCH 2/4 -rev1] Add new timeval_to_sec function

2007-07-25 Thread Oliver Hartkopp
Eric Dumazet wrote: > Varun Chandramohan a écrit : >> >> +return (tv->tv_sec + (tv->tv_usec + 99)/100); > > return tv->tv_sec + (tv->tv_usec ? 1 : 0); > > is much faster It additionally wins the design award in opposite to my suggestion ;-) Thanks! - To unsubscribe from this list: se

Re: [PATCH 2/4 -rev1] Add new timeval_to_sec function

2007-07-25 Thread Eric Dumazet
Varun Chandramohan a écrit : A new function for converting timeval to time_t is added in time.h. Its a common function used in different places. The timeout is now rounded up as per the suggestion. Signed-off-by: Varun Chandramohan <[EMAIL PROTECTED]> --- include/linux/time.h | 11 ++

[PATCH 2/4 -rev1] Add new timeval_to_sec function

2007-07-25 Thread Varun Chandramohan
A new function for converting timeval to time_t is added in time.h. Its a common function used in different places. The timeout is now rounded up as per the suggestion. Signed-off-by: Varun Chandramohan <[EMAIL PROTECTED]> --- include/linux/time.h | 11 +++ 1 files changed, 11 insertio