summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/timer.h')
-rw-r--r--src/devices/machine/timer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/devices/machine/timer.h b/src/devices/machine/timer.h
index 64dc66f38c5..04d0f192325 100644
--- a/src/devices/machine/timer.h
+++ b/src/devices/machine/timer.h
@@ -85,7 +85,7 @@ public:
bool enabled() const { return m_timer->enabled(); }
// property setters
- void set_param(int param) const { assert(m_type == TIMER_TYPE_GENERIC); m_timer->set_param(param); }
+ void set_param(int param) const { if(m_type != TIMER_TYPE_GENERIC) fatalerror("Cannot change parameter on a non-generic timer.\n"); m_timer->set_param(param); }
void set_ptr(void *ptr) { m_ptr = ptr; }
void enable(bool enable = true) const { m_timer->enable(enable); }
@@ -93,7 +93,8 @@ public:
void reset() { adjust(attotime::never, 0, attotime::never); }
void adjust(const attotime &duration, s32 param = 0, const attotime &period = attotime::never) const
{
- assert(m_type == TIMER_TYPE_GENERIC);
+ if(m_type != TIMER_TYPE_GENERIC)
+ fatalerror("Cannot adjust a non-generic timer.\n");
m_timer->adjust(duration, param, period);
}