Improved profiler logs

This commit is contained in:
LemADEC 2015-09-01 23:02:01 +02:00
parent 29fcc5539d
commit 9759f468fe

View file

@ -33,8 +33,9 @@ public class LocalProfiler {
nextStackElement.internal += dt; nextStackElement.internal += dt;
} }
long self = (dt - stackElement.internal) / 1000; // in microseconds // convert to microseconds
long self = (dt - stackElement.internal) / 1000;
long total = dt / 1000; long total = dt / 1000;
WarpDrive.logger.info("Profiling '" + stackElement.name + "': " + (self / 1000.0F) + " ms, total: " + (total / 1000.0F) + " ms"); WarpDrive.logger.info("Profiling " + stackElement.name + ": " + (self / 1000.0F) + " ms" + ((total == self) ? "" : (", total: " + (total / 1000.0F) + " ms")));
} }
} }