From b76e210cdf31a63c02d3713f5083ce5d4c5178f0 Mon Sep 17 00:00:00 2001 From: paulby Date: Thu, 12 Apr 2007 23:37:44 +0000 Subject: Stats logger for total execution time of users Behaviors git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@818 ba19aa83-45c5-6ac9-afd3-db810772062c --- src/classes/share/javax/media/j3d/BehaviorScheduler.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/classes/share') diff --git a/src/classes/share/javax/media/j3d/BehaviorScheduler.java b/src/classes/share/javax/media/j3d/BehaviorScheduler.java index 3af26ba..340623c 100644 --- a/src/classes/share/javax/media/j3d/BehaviorScheduler.java +++ b/src/classes/share/javax/media/j3d/BehaviorScheduler.java @@ -13,6 +13,7 @@ package javax.media.j3d; import java.util.ArrayList; +import java.util.logging.Level; class BehaviorScheduler extends J3dThread { @@ -210,6 +211,9 @@ class BehaviorScheduler extends J3dThread { behaviorStructure.handleBehaviorPost(); lastStopTime = J3dClock.currentTimeMillis(); + if (MasterControl.isStatsLoggable(Level.FINE)) { + VirtualUniverse.mc.recordTime(MasterControl.TimeType.BEHAVIOR, (lastStopTime-lastStartTime)*1000000); + } } void free() { -- cgit v1.2.3