[Click] _tv_sec in gaprate.hh

Alan Tang a.tang at gmx.net
Mon Apr 4 08:42:49 EDT 2005


Hi everyone,

Should  _tv_sec in gaprate.hh be type long instead of int?
Because from http://linux.about.com/library/cmd/blcmdl2_settimeofday.htm

struct timeval {
long    tv_sec;         /* seconds */
long    tv_usec;        /* microseconds */
};

and in GapRate::need_update we have 
if (_tv_sec < 0) {
    _tv_sec = now.tv_sec;

So we are assigning a long to an int.

Regards
Alan


More information about the click mailing list