summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu
diff options
context:
space:
mode:
author Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-09-21 10:54:49 +0000
committer Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-09-21 10:54:49 +0000
commit0ae42080ee072e73d6201420b04ecffcfe1cc1d0 (patch)
tree68c583776ecded89ef69cde28122f06566dfd4f2 /src/emu
parent7c989b8a91c3a86a5c9ced9f88ce08a1f36fa198 (diff)
safety assert on from_hz
Diffstat (limited to 'src/emu')
-rw-r--r--src/emu/attotime.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/emu/attotime.h b/src/emu/attotime.h
index eb9e1ee2915..b922e3308bf 100644
--- a/src/emu/attotime.h
+++ b/src/emu/attotime.h
@@ -143,7 +143,7 @@ public:
static attotime from_msec(INT64 msec) { return attotime(msec / 1000, (msec % 1000) * (ATTOSECONDS_PER_SECOND / 1000)); }
static attotime from_usec(INT64 usec) { return attotime(usec / 1000000, (usec % 1000000) * (ATTOSECONDS_PER_SECOND / 1000000)); }
static attotime from_nsec(INT64 nsec) { return attotime(nsec / 1000000000, (nsec % 1000000000) * (ATTOSECONDS_PER_SECOND / 1000000000)); }
- static attotime from_hz(double frequency) { return attotime(0, double(ATTOSECONDS_PER_SECOND) / frequency); }
+ static attotime from_hz(double frequency) { assert(frequency > 1); return attotime(0, double(ATTOSECONDS_PER_SECOND) / frequency); }
// math
attotime &operator+=(const attotime &right);