make profiling togglable

This commit is contained in:
2024-08-04 15:20:11 -05:00
parent 570c12e3db
commit 33d4ebf14a
10 changed files with 111 additions and 45 deletions

View File

@@ -66,9 +66,10 @@ actor.delay = function(fn, seconds) {
stop.pct = function() { return 1-(stop.remain / stop.seconds); };
function update(dt) {
profile.frame("timer");
stop.remain -= dt;
if (stop.remain <= 0)
execute();
if (stop.remain <= 0) execute();
profile.endframe();
}
var rm = Register.appupdate.register(update);