summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-11-09 20:29:10 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-11-09 20:29:10 +0000
commit8ee9da05ed8d6b6538c1453adaf6f3f1f1366806 (patch)
tree41ccf11f97621d0d8a30f20a8bd30d425db6188c /include
parent4b82681c65b6bea328d82cc717a854f34ed808a9 (diff)
downloadllvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.tar.gz
llvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.tar.bz2
llvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.tar.xz
Provide conversion from posix time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/System/TimeValue.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/System/TimeValue.h b/include/llvm/System/TimeValue.h
index bef04dc9a0..71afd863f0 100644
--- a/include/llvm/System/TimeValue.h
+++ b/include/llvm/System/TimeValue.h
@@ -315,6 +315,15 @@ namespace sys {
this->normalize();
}
+ /// Converts the \p seconds argument from PosixTime to the corresponding
+ /// TimeValue and assigns that value to \p this.
+ /// @brief Convert seconds form PosixTime to TimeValue
+ void fromPosixTime( SecondsType seconds ) {
+ seconds_ = seconds + PosixZeroTime.seconds_;
+ nanos_ = 0;
+ this->normalize();
+ }
+
/// @}
/// @name Implementation
/// @{