1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

r4669: a timeval_to_nttime() function as requested by abartlet. Andrew, its

your responsibility to use/test this :-)
(This used to be commit 2107b0cd76)
This commit is contained in:
Andrew Tridgell 2005-01-11 03:07:53 +00:00 committed by Gerald (Jerry) Carter
parent fdfa2adcb1
commit a7a5c98e29

View File

@ -536,3 +536,13 @@ struct timeval timeval_diff(struct timeval *tv1, struct timeval *tv2)
}
return t;
}
/*
convert a timeval to a NTTIME
*/
NTTIME timeval_to_nttime(struct timeval *tv)
{
double t1 = tv->tv_sec + (tv->tv_usec*1.0e-6);
return (t1 + TIME_FIXUP_CONSTANT) * 1.0e7;
}