svn commit: samba r18614 - in
mimir at samba.org
Wed Sep 20 15:31:06 GMT 2006
On Tue, Sep 19, 2006 at 10:14:44PM -0700, tridge at samba.org wrote:
> > a new function converting NTTIME to struct timeval
> > + tv->tv_usec = t - tv->tv_sec*1000000;
> > +}
> Are you sure thats correct?
Well, just for a quick check I put a code, in one of my test, getting
current time in timeval, converting it to NTTIME, and converting it
to timeval back again. It did work correctly, though I didn't do any
> 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;
The idea of doing it was based on nt_time_to_unix function.
> 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
Sure, I was also thinking about that. The only thing that stopped me
that time was "do we really need to test this ?", but it looks like
Samba Team member http://www.samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20060920/9c17f550/attachment.bin
More information about the samba-technical