summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/timer.c')
-rw-r--r--src/emu/timer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/emu/timer.c b/src/emu/timer.c
index f2422276a3a..62080cacfe8 100644
--- a/src/emu/timer.c
+++ b/src/emu/timer.c
@@ -300,8 +300,7 @@ void timer_init(running_machine *machine)
int i;
/* allocate global data */
- global = machine->timer_data = (timer_private *)auto_malloc(sizeof(*global));
- memset(global, 0, sizeof(*global));
+ global = machine->timer_data = auto_alloc_clear(machine, timer_private);
/* we need to wait until the first call to timer_cyclestorun before using real CPU times */
global->exec.basetime = attotime_zero;