mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-25 16:31:42 +00:00
Use constexpr functions in preference to macros.
This commit is contained in:
parent
a3d37640aa
commit
53d6d311a7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user