Skip to content

Commit

Permalink
Main - Update ENABLE_PERFORMANCE_COUNTERS macro: the sequel
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Jan 13, 2025
1 parent f83bd56 commit e2299da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/main/script_debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ PERFORMANCE COUNTERS SECTION
// To Use: [] call ace_common_fnc_dumpPerformanceCounters;

#ifdef ENABLE_PERFORMANCE_COUNTERS
#define CBA_fnc_addPerFrameHandler { private _ret = (_this select [0, 2]) call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], (_this select [0, 2])]; _ret }
#define CBA_fnc_addPerFrameHandler { private _ret = call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], _this]; _ret }

#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
Expand Down

0 comments on commit e2299da

Please sign in to comment.