summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-02-10 02:49:52 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-02-10 02:49:52 +0000
commit9e08f9a9ad1a52f44f93fe2f176a36f52c2d062e (patch)
tree3b9f7ed59283bfe257a68150b8592b807e9f0972
parent5a8ec4e287f51cd64351d7c5be63c498e7d85f07 (diff)
downloadbcm5719-llvm-9e08f9a9ad1a52f44f93fe2f176a36f52c2d062e.tar.gz
bcm5719-llvm-9e08f9a9ad1a52f44f93fe2f176a36f52c2d062e.zip
__threading_support: fix windows build
The build was broken as there was no overload for long and std::chrono::nanoseconds. Add an explicit conversion to use the operator+. llvm-svn: 294698
-rw-r--r--libcxx/include/__threading_support3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index b938d9c2b76..1e8be3fdab7 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -591,7 +591,8 @@ void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
{
using namespace chrono;
// round-up to the nearest milisecond
- milliseconds __ms = duration_cast<milliseconds>(__ns + 999999);
+ milliseconds __ms =
+ duration_cast<milliseconds>(__ns + chrono::nanoseconds(999999));
Sleep(__ms.count());
}
OpenPOWER on IntegriCloud