diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-11-09 20:29:10 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-11-09 20:29:10 +0000 |
commit | 8ee9da05ed8d6b6538c1453adaf6f3f1f1366806 (patch) | |
tree | 41ccf11f97621d0d8a30f20a8bd30d425db6188c /include/llvm/System | |
parent | 4b82681c65b6bea328d82cc717a854f34ed808a9 (diff) | |
download | external_llvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.zip external_llvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.tar.gz external_llvm-8ee9da05ed8d6b6538c1453adaf6f3f1f1366806.tar.bz2 |
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/llvm/System')
-rw-r--r-- | include/llvm/System/TimeValue.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/System/TimeValue.h b/include/llvm/System/TimeValue.h index bef04dc..71afd86 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 /// @{ |