--- nono/vm/device.h 2026/04/29 17:05:51 1.1.1.18 +++ nono/vm/device.h 2026/04/29 17:06:01 1.1.1.19 @@ -12,6 +12,7 @@ #include "object.h" #include "bus.h" +#include "nono.h" #if BYTE_ORDER == LITTLE_ENDIAN #define HB(addr) ((addr) ^ 1) @@ -30,48 +31,6 @@ assert((bool)__CONCAT(p,NAME)); \ } while (0) -// ユーザ定義リテラルを使ったサフィックス - -// ナノ秒 -static inline constexpr uint64 operator"" _nsec(unsigned long long ns) -{ - return ns; -} -static inline constexpr uint64 operator"" _nsec(long double ns) -{ - return ns; -} - -// マイクロ秒 -static inline constexpr uint64 operator"" _usec(unsigned long long us) -{ - return us * 1000_nsec; -} -static inline constexpr uint64 operator"" _usec(long double us) -{ - return us * 1000_nsec; -} - -// ミリ秒 -static inline constexpr uint64 operator"" _msec(unsigned long long ms) -{ - return ms * 1000_usec; -} -static inline constexpr uint64 operator"" _msec(long double ms) -{ - return ms * 1000_usec; -} - -// 秒 -static inline constexpr uint64 operator"" _sec(unsigned long long sec) -{ - return sec * 1000_msec; -} -static inline constexpr uint64 operator"" _sec(long double sec) -{ - return sec * 1000_msec; -} - // 前方参照 class Device; class Event;