svn commit: samba r18614 - in branches/SAMBA_4_0/source/lib/util: .

tridge at tridge at
Wed Sep 20 05:14:44 GMT 2006


 > a new function converting NTTIME to struct timeval

 > +	tv->tv_usec = t - tv->tv_sec*1000000;
 > +}

Are you sure thats correct? Maybe it's equivalent somehow, but I
suspect to get the tv_usec value will involve a modulo operation,
something like:

  tv->tv_usec = ((t+5) % 10000000) / 10;

Maybe we need a LOCAL-TIME unit test for these time functions?
Converting from timeval to NTTIME then back again for some random
times might be a useful test (with appropriate 0.5usec tolerence

Cheers, Tridge

More information about the samba-technical mailing list