<chrono> should always be available with C++17
Change-Id: Ia4868259bfa25e4b929a51de6de580df7277c282 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
d4b206b246
commit
f01ec0713d
@ -173,7 +173,6 @@ public:
|
|||||||
return lockInternal(timeout);
|
return lockInternal(timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __has_include(<chrono>) || defined(Q_CLANG_QDOC)
|
|
||||||
// TimedLockable concept
|
// TimedLockable concept
|
||||||
template <class Rep, class Period>
|
template <class Rep, class Period>
|
||||||
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
||||||
@ -190,7 +189,6 @@ public:
|
|||||||
|
|
||||||
return try_lock_for(timePoint - Clock::now());
|
return try_lock_for(timePoint - Clock::now());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class QRecursiveMutexPrivate;
|
class QRecursiveMutexPrivate;
|
||||||
@ -213,7 +211,6 @@ public:
|
|||||||
// Lockable concept
|
// Lockable concept
|
||||||
bool try_lock() QT_MUTEX_LOCK_NOEXCEPT { return tryLock(); }
|
bool try_lock() QT_MUTEX_LOCK_NOEXCEPT { return tryLock(); }
|
||||||
|
|
||||||
#if __has_include(<chrono>) || defined(Q_CLANG_QDOC)
|
|
||||||
// TimedLockable concept
|
// TimedLockable concept
|
||||||
template <class Rep, class Period>
|
template <class Rep, class Period>
|
||||||
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
bool try_lock_for(std::chrono::duration<Rep, Period> duration)
|
||||||
@ -230,7 +227,6 @@ public:
|
|||||||
|
|
||||||
return try_lock_for(timePoint - Clock::now());
|
return try_lock_for(timePoint - Clock::now());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename Mutex>
|
template <typename Mutex>
|
||||||
@ -291,7 +287,6 @@ public:
|
|||||||
inline bool try_lock() noexcept { return true; }
|
inline bool try_lock() noexcept { return true; }
|
||||||
inline void unlock() noexcept {}
|
inline void unlock() noexcept {}
|
||||||
|
|
||||||
#if __has_include(<chrono>)
|
|
||||||
template <class Rep, class Period>
|
template <class Rep, class Period>
|
||||||
inline bool try_lock_for(std::chrono::duration<Rep, Period> duration) noexcept
|
inline bool try_lock_for(std::chrono::duration<Rep, Period> duration) noexcept
|
||||||
{
|
{
|
||||||
@ -305,7 +300,6 @@ public:
|
|||||||
Q_UNUSED(timePoint);
|
Q_UNUSED(timePoint);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY(QMutex)
|
Q_DISABLE_COPY(QMutex)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user