19#ifndef __MBED_CHRONO_H__
20#define __MBED_CHRONO_H__
22#include "mbed_toolchain.h"
48using deciseconds = std::chrono::duration<long long, std::deci>;
49using centiseconds = std::chrono::duration<long long, std::centi>;
58using microseconds_u32 = std::chrono::duration<std::uint32_t, std::micro>;
67using milliseconds_u32 = std::chrono::duration<std::uint32_t, std::milli>;
71inline namespace literals {
73inline namespace chrono_literals {
86constexpr chrono::deciseconds
operator "" _ds(
unsigned long long x)
88 chrono::deciseconds::rep val =
static_cast<chrono::deciseconds::rep
>(x);
89 assert(val >= 0 &&
static_cast<unsigned long long>(val) == x);
90 return chrono::deciseconds(val);
104constexpr chrono::centiseconds
operator "" _cs(
unsigned long long x)
106 chrono::centiseconds::rep val =
static_cast<chrono::centiseconds::rep
>(x);
107 assert(val >= 0 &&
static_cast<unsigned long long>(val) == x);
108 return chrono::centiseconds(val);
117using namespace chrono_literals;