git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcf90b6
)
r17818: Fixup uint64 time calc. NT time is a 64 bit number,
author
Jeremy Allison
<jra@samba.org>
Thu, 24 Aug 2006 23:39:37 +0000
(23:39 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 16:38:52 +0000
(11:38 -0500)
not high value seconds, low value 100ns units.
Jeremy.
(This used to be commit
ead75870d5d3c690fabd131a9dd8776e854638dc
)
source3/lib/time.c
patch
|
blob
|
history
diff --git
a/source3/lib/time.c
b/source3/lib/time.c
index 7d8f79b14a9ead31d5dfd158e3de7ce3bcd72403..b4477d693ac30d23b4f8960abac451ef8d8926f6 100644
(file)
--- a/
source3/lib/time.c
+++ b/
source3/lib/time.c
@@
-316,12
+316,12
@@
void unix_timespec_to_nt_time(NTTIME *nt, struct timespec ts)
d = ts.tv_sec;
d += TIME_FIXUP_CONSTANT_INT;
- d
= ts.tv_sec *
1000*1000*10;
+ d
*=
1000*1000*10;
/* d is now in 100ns units. */
d += (ts.tv_nsec / 100);
- nt->
high = (uint32)(d / 1000*1000*10
);
- nt->
low = (uint32)(d % 1000*1000*10
);
+ nt->
low = (uint32)(d & 0xFFFFFFFF
);
+ nt->
high = (uint32)(d >> 32
);
}
#else