aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
/// @{