summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/profiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/profiler.cpp')
-rw-r--r--src/emu/profiler.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/emu/profiler.cpp b/src/emu/profiler.cpp
index 173e2f4d767..19f3908f097 100644
--- a/src/emu/profiler.cpp
+++ b/src/emu/profiler.cpp
@@ -89,8 +89,11 @@ real_profiler_state::real_profiler_state()
// reset - initializes state
//-------------------------------------------------
-void real_profiler_state::reset(bool enabled)
+void real_profiler_state::reset(bool enabled) noexcept
{
+ // disabling the profiler from the UI happens while PROFILER_EXTRA is active
+ //assert(!m_filoptr || (m_filoptr == m_filo));
+
m_text_time = attotime::never;
if (enabled)
@@ -117,10 +120,10 @@ void real_profiler_state::reset(bool enabled)
const char *real_profiler_state::text(running_machine &machine)
{
- start(PROFILER_PROFILER);
+ auto profile = start(PROFILER_PROFILER);
// get the current time
- attotime current_time = machine.scheduler().time();
+ attotime const current_time = machine.scheduler().time();
// we only want to update the text periodically
if ((m_text_time == attotime::never) || ((current_time - m_text_time).as_double() >= TEXT_UPDATE_TIME))
@@ -129,7 +132,6 @@ const char *real_profiler_state::text(running_machine &machine)
m_text_time = current_time;
}
- stop();
return m_text.c_str();
}
@@ -193,7 +195,7 @@ void real_profiler_state::update_text(running_machine &machine)
}
// loop over all types and generate the string
- device_iterator iter(machine.root_device());
+ device_enumerator iter(machine.root_device());
std::ostringstream stream;
for (curtype = PROFILER_DEVICE_FIRST; curtype < PROFILER_TOTAL; ++curtype)
{