tone-generator/timing.hpp

17 lines
178 B
C++
Raw Permalink Normal View History

2024-08-19 22:43:24 +10:00
#pragma once
namespace timing {
inline uint32_t at = 0;
inline uint32_t diff = 0;
inline void update() {
uint32_t now = micros();
diff = now - at;
at = now;
}
};