summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/schedule.h
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-06-04 18:40:14 +1000
committer Vas Crabb <vas@vastheman.com>2022-06-04 18:40:14 +1000
commit0f40df67a8a18972babe5ae418e861bca4d19f1c (patch)
tree546c7b216335509bb7194d131a55dd89143da575 /src/emu/schedule.h
parentc93195e72f81105ec99ae14692b63e8318a02948 (diff)
emu/schedule.cpp: Reduced spam from use of synchronize() - it serves a purpose for now.
Diffstat (limited to 'src/emu/schedule.h')
-rw-r--r--src/emu/schedule.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/emu/schedule.h b/src/emu/schedule.h
index e009850cf34..dbaca005572 100644
--- a/src/emu/schedule.h
+++ b/src/emu/schedule.h
@@ -45,7 +45,7 @@ class emu_timer
~emu_timer();
// allocation and re-use
- emu_timer &init(running_machine &machine, timer_expired_delegate callback, bool temporary);
+ emu_timer &init(running_machine &machine, timer_expired_delegate &&callback, bool temporary) ATTR_HOT;
emu_timer &release();
public:
@@ -120,7 +120,8 @@ public:
emu_timer *timer_alloc(timer_expired_delegate callback);
[[deprecated("timer_set is deprecated; please avoid anonymous timers. Use TIMER_CALLBACK_MEMBER and an allocated emu_timer instead.")]]
void timer_set(const attotime &duration, timer_expired_delegate callback, int param = 0);
- void synchronize(timer_expired_delegate callback = timer_expired_delegate(), int param = 0) { timer_set(attotime::zero, callback, param); }
+ void synchronize(timer_expired_delegate callback = timer_expired_delegate(), int param = 0)
+ { m_timer_allocator.alloc()->init(machine(), std::move(callback), true).adjust(attotime::zero, param); }
// debugging
void dump_timers() const;