summaryrefslogtreecommitdiff
path: root/include/llvm/Support/TimeValue.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-12-22 00:04:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-12-22 00:04:03 +0000
commitf8af5cf600354830d4ccf59732403f0f073eccb9 (patch)
tree2ba0398b4c42ad4f55561327538044fd2c925a8b /include/llvm/Support/TimeValue.h
parent59d6cff90eecf31cb3dd860c4e786674cfdd42eb (diff)
Diffstat (limited to 'include/llvm/Support/TimeValue.h')
-rw-r--r--include/llvm/Support/TimeValue.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Support/TimeValue.h b/include/llvm/Support/TimeValue.h
index 4b48b849f20df..27854088f0561 100644
--- a/include/llvm/Support/TimeValue.h
+++ b/include/llvm/Support/TimeValue.h
@@ -253,9 +253,10 @@ namespace sys {
/// Converts the TimeValue into the corresponding number of "ticks" for
/// Win32 platforms, correcting for the difference in Win32 zero time.
- /// @brief Convert to windows time (seconds since 12:00:00a Jan 1, 1601)
+ /// @brief Convert to Win32's FILETIME
+ /// (100ns intervals since 00:00:00 Jan 1, 1601 UTC)
uint64_t toWin32Time() const {
- uint64_t result = seconds_ - Win32ZeroTimeSeconds;
+ uint64_t result = (uint64_t)10000000 * (seconds_ - Win32ZeroTimeSeconds);
result += nanos_ / NANOSECONDS_PER_WIN32_TICK;
return result;
}