MCPcopy Create free account
hub / github.com/TASEmulators/fceux / debugger_getcyclescount

Function debugger_getcyclescount

src/lua-engine.cpp:5007–5017  ·  view source on GitHub ↗

debugger.getcyclescount()

Source from the content-addressed store, hash-verified

5005
5006// debugger.getcyclescount()
5007static int debugger_getcyclescount(lua_State *L)
5008{
5009 int64 counter_value = timestampbase + (uint64)timestamp - total_cycles_base;
5010 if (counter_value < 0) // sanity check
5011 {
5012 ResetDebugStatisticsCounters();
5013 counter_value = 0;
5014 }
5015 lua_pushinteger(L, counter_value);
5016 return 1;
5017}
5018
5019// debugger.getinstructionscount()
5020static int debugger_getinstructionscount(lua_State *L)

Callers

nothing calls this directly

Calls 2

lua_pushintegerFunction · 0.85

Tested by

no test coverage detected