Elma
An event loop manager for embedded systems
literals.h
Go to the documentation of this file.
1 #ifndef _ELMA_LITERALS_H
2 #define _ELMA_LITERALS_H
3 
4 #include <chrono>
5 
6 using namespace std::chrono;
7 
9 
10 namespace elma {
11 
13  constexpr high_resolution_clock::duration operator"" _s ( unsigned long long x ) {
14  return high_resolution_clock::duration(seconds(x));
15  }
16 
18  constexpr high_resolution_clock::duration operator"" _ms ( unsigned long long x ) {
19  return high_resolution_clock::duration(milliseconds(x));
20  }
21 
23  constexpr high_resolution_clock::duration operator"" _us ( unsigned long long x ) {
24  return high_resolution_clock::duration(microseconds(x));
25  }
26 
27 }
28 
29 #endif
Definition: channel.cc:5