mirror of https://github.com/ARMmbed/mbed-os.git
Fix the CI build issue
parent
c71c980ccd
commit
a10dafdda8
|
@ -18,6 +18,7 @@
|
|||
#define MBED_LOWPOWERCLOCK_H
|
||||
|
||||
#include <chrono>
|
||||
#if DEVICE_LPTICKER
|
||||
#include "hal/lp_ticker_api.h"
|
||||
|
||||
namespace mbed {
|
||||
|
@ -63,4 +64,5 @@ public:
|
|||
/** @}*/
|
||||
|
||||
}
|
||||
#endif /* DEVICE_LPTICKER */
|
||||
#endif /* MBED_LOWPOWERCLOCK_H */
|
||||
|
|
|
@ -44,7 +44,9 @@ Timeout::Timeout() : TimeoutBase(get_us_ticker_data(), true)
|
|||
* (In C++17 could avoid the need for this by making the members inline).
|
||||
*/
|
||||
const bool HighResClock::is_steady;
|
||||
#if DEVICE_LPTICKER
|
||||
const bool LowPowerClock::is_steady;
|
||||
#endif
|
||||
const bool RealTimeClock::is_steady;
|
||||
|
||||
#if DEVICE_LPTICKER
|
||||
|
|
|
@ -85,7 +85,10 @@ inline namespace chrono_literals {
|
|||
constexpr chrono::deciseconds operator "" _ds(unsigned long long x)
|
||||
{
|
||||
chrono::deciseconds::rep val = static_cast<chrono::deciseconds::rep>(x);
|
||||
assert(val >= 0 && static_cast<unsigned long long>(val) == x);
|
||||
if (val < 0) {
|
||||
assert(false);
|
||||
}
|
||||
assert(static_cast<unsigned long long>(val) == x);
|
||||
return chrono::deciseconds(val);
|
||||
}
|
||||
|
||||
|
@ -103,7 +106,10 @@ constexpr chrono::deciseconds operator "" _ds(unsigned long long x)
|
|||
constexpr chrono::centiseconds operator "" _cs(unsigned long long x)
|
||||
{
|
||||
chrono::centiseconds::rep val = static_cast<chrono::centiseconds::rep>(x);
|
||||
assert(val >= 0 && static_cast<unsigned long long>(val) == x);
|
||||
if (val < 0) {
|
||||
assert(false);
|
||||
}
|
||||
assert(static_cast<unsigned long long>(val) == x);
|
||||
return chrono::centiseconds(val);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue