summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/TimeValue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/TimeValue.cpp')
-rw-r--r--llvm/lib/Support/TimeValue.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Support/TimeValue.cpp b/llvm/lib/Support/TimeValue.cpp
index 94a4c011693..18c84ca9fa0 100644
--- a/llvm/lib/Support/TimeValue.cpp
+++ b/llvm/lib/Support/TimeValue.cpp
@@ -12,7 +12,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/TimeValue.h"
-#include "llvm/Config/config.h"
+#include "llvm/Support/Chrono.h"
+#include "llvm/Support/ScopedPrinter.h"
namespace llvm {
@@ -45,12 +46,10 @@ void TimeValue::normalize() {
}
}
-} // namespace llvm
+std::string TimeValue::str() const { return to_string(TimePoint<>(*this)); }
+
+TimeValue TimeValue::now() {
+ return TimePoint<>(std::chrono::system_clock::now());
+}
-/// Include the platform-specific portion of TimeValue class
-#ifdef LLVM_ON_UNIX
-#include "Unix/TimeValue.inc"
-#endif
-#ifdef LLVM_ON_WIN32
-#include "Windows/TimeValue.inc"
-#endif
+} // namespace llvm
OpenPOWER on IntegriCloud