Mock Arduino timing functions
| 17 | |
| 18 | // Mock Arduino timing functions |
| 19 | inline unsigned long millis() { |
| 20 | static auto start = std::chrono::steady_clock::now(); |
| 21 | auto now = std::chrono::steady_clock::now(); |
| 22 | return std::chrono::duration_cast<std::chrono::milliseconds>(now - start).count(); |
| 23 | } |
| 24 | |
| 25 | inline unsigned long micros() { |
| 26 | static auto start = std::chrono::steady_clock::now(); |
no outgoing calls