mirror of
https://github.com/TomHarte/CLK.git
synced 2025-08-09 05:25:01 +00:00
Use constexpr functions in preference to macros.
This commit is contained in:
@@ -57,8 +57,8 @@ enum Line: BusState {
|
||||
Request = 1 << 17,
|
||||
};
|
||||
|
||||
#define us(x) (x) / 1000000.0
|
||||
#define ns(x) (x) / 1000000000.0
|
||||
constexpr double us(double t) { return t / 1'000'000.0; }
|
||||
constexpr double ns(double t) { return t / 1'000'000'000.0; }
|
||||
|
||||
/// The minimum amount of time that reset must be held for.
|
||||
constexpr double ResetHoldTime = us(25.0);
|
||||
|
Reference in New Issue
Block a user