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

2007-07-24 Thread David Stevens
Oliver Hartkopp <[EMAIL PROTECTED]> wrote on 07/23/2007 11:22:39 PM: > When you like to create any timeout based on your calculated value, you > might run into the problem that your calculated value is set to _zero_ > even if there was "some time" before the conversion. This might probably > not w

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

2007-07-24 Thread Varun Chandramohan
Patrick McHardy wrote: > Varun Chandramohan wrote: > >> Oliver Hartkopp wrote: >> >> > I don't think you should round down timeout values. > > > > Can you elaborate on that? As per the RFC of MIB ,we need only seconds granularity. Taking

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

2007-07-24 Thread Patrick McHardy
Varun Chandramohan wrote: > Oliver Hartkopp wrote: > I don't think you should round down timeout values. >>> >>>Can you elaborate on that? As per the RFC of MIB ,we need only seconds >>>granularity. Taking that as the case i dont understand why round down >>>should n

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

2007-07-23 Thread Varun Chandramohan
Oliver Hartkopp wrote: > Varun Chandramohan wrote: > >> Patrick McHardy wrote: >> >> >>> Varun Chandramohan wrote: >>> >>> >>> /** + * timeval_to_sec - Convert timeval to seconds + * @tv: pointer to the timeval variable to be converted + *

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

2007-07-23 Thread Oliver Hartkopp
Varun Chandramohan wrote: > Patrick McHardy wrote: > >> Varun Chandramohan wrote: >> >> >>> /** >>> + * timeval_to_sec - Convert timeval to seconds >>> + * @tv: pointer to the timeval variable to be converted >>> + * >>> + * Returns the seconds representation of timeval paramete

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

2007-07-23 Thread Varun Chandramohan
Patrick McHardy wrote: > Varun Chandramohan wrote: > >> /** >> + * timeval_to_sec - Convert timeval to seconds >> + * @tv: pointer to the timeval variable to be converted >> + * >> + * Returns the seconds representation of timeval parameter. >> + */ >> +static inline time_t timeval_to_s

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

2007-07-23 Thread Patrick McHardy
Varun Chandramohan wrote: > /** > + * timeval_to_sec - Convert timeval to seconds > + * @tv: pointer to the timeval variable to be converted > + * > + * Returns the seconds representation of timeval parameter. > + */ > +static inline time_t timeval_to_sec(const struct timeval *tv) > +{ > +

[PATCH 2/4] Add new timeval_to_sec function

2007-07-22 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. Signed-off-by: Varun Chandramohan <[EMAIL PROTECTED]> --- include/linux/time.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/include/linux/tim