Moved PerformanceMonitor and PerformanceObserver into media.util to remove
dependencies of media on miso. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@562 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: AnimationManager.java,v 1.16 2001/09/13 19:10:26 mdb Exp $
|
||||
// $Id: AnimationManager.java,v 1.17 2001/10/25 22:08:28 mdb Exp $
|
||||
|
||||
package com.threerings.media.sprite;
|
||||
|
||||
@@ -12,8 +12,8 @@ import com.samskivert.util.Interval;
|
||||
import com.samskivert.util.IntervalManager;
|
||||
|
||||
import com.threerings.media.Log;
|
||||
import com.threerings.miso.util.PerformanceMonitor;
|
||||
import com.threerings.miso.util.PerformanceObserver;
|
||||
import com.threerings.media.util.PerformanceMonitor;
|
||||
import com.threerings.media.util.PerformanceObserver;
|
||||
|
||||
/**
|
||||
* The AnimationManager handles the regular refreshing of the scene
|
||||
|
||||
@@ -1,33 +1,32 @@
|
||||
//
|
||||
// $Id: PerformanceMonitor.java,v 1.2 2001/08/13 15:00:24 shaper Exp $
|
||||
// $Id: PerformanceMonitor.java,v 1.3 2001/10/25 22:08:29 mdb Exp $
|
||||
|
||||
package com.threerings.miso.util;
|
||||
package com.threerings.media.util;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.threerings.miso.Log;
|
||||
import com.threerings.media.Log;
|
||||
|
||||
/**
|
||||
* The <code>PerformanceMonitor</code> class provides a simple
|
||||
* mechanism for monitoring the number of times an action takes place
|
||||
* within a certain time period.
|
||||
* Provides a simple mechanism for monitoring the number of times an
|
||||
* action takes place within a certain time period.
|
||||
*
|
||||
* <p> The action being tracked should be registered with a suitable
|
||||
* name via <code>register()</code>, and <code>tick()</code> should be
|
||||
* called each time the action is performed.
|
||||
* <p> The action being tracked should be registered with a suitable name
|
||||
* via {@link #register}, and {@link #tick} should be called each time the
|
||||
* action is performed.
|
||||
*
|
||||
* <p> Whenever <code>tick()</code> is called and the checkpoint time
|
||||
* interval has elapsed since the last checkpoint (if any), the
|
||||
* observer will be notified to that effect by a call to
|
||||
* <code>PerformanceObserver.checkpoint()</code>.
|
||||
* <p> Whenever {@link #tick} is called and the checkpoint time interval
|
||||
* has elapsed since the last checkpoint (if any), the observer will be
|
||||
* notified to that effect by a call to {@link
|
||||
* PerformanceObserver#checkpoint}.
|
||||
*
|
||||
* <p> Note that this is <em>not</em> intended to be used as an
|
||||
* industrial-strength profiling or performance monitoring tool. The
|
||||
* checkpoint time interval granularity is in milliseconds, not
|
||||
* microseconds, and the observer's <code>checkpoint()</code> method
|
||||
* will never be called until/unless a subsequent call to
|
||||
* <code>tick()</code> is made after the requested number of
|
||||
* milliseconds have passed since the last checkpoint.
|
||||
* microseconds, and the observer's <code>checkpoint()</code> method will
|
||||
* never be called until/unless a subsequent call to {@link #tick} is made
|
||||
* after the requested number of milliseconds have passed since the last
|
||||
* checkpoint.
|
||||
*/
|
||||
public class PerformanceMonitor
|
||||
{
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
//
|
||||
// $Id: PerformanceObserver.java,v 1.1 2001/08/02 00:42:02 shaper Exp $
|
||||
// $Id: PerformanceObserver.java,v 1.2 2001/10/25 22:08:29 mdb Exp $
|
||||
|
||||
package com.threerings.miso.util;
|
||||
package com.threerings.media.util;
|
||||
|
||||
/**
|
||||
* The <code>PerformanceObserver</code> interface should be
|
||||
* implemented by classes that wish to register actions to be
|
||||
* monitored by the <code>PerformanceMonitor</code> class.
|
||||
* This interface should be implemented by classes that wish to register
|
||||
* actions to be monitored by the {@link PerformanceMonitor} class.
|
||||
*/
|
||||
public interface PerformanceObserver
|
||||
{
|
||||
/**
|
||||
* This method is called by the <code>PerformanceMonitor</code>
|
||||
* class whenever an action's requested time interval between
|
||||
* checkpoints has expired.
|
||||
* This method is called by the {@link PerformanceMonitor} class
|
||||
* whenever an action's requested time interval between checkpoints
|
||||
* has expired.
|
||||
*
|
||||
* @param name the action name.
|
||||
* @param ticks the ticks since the last checkpoint.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: ViewerSceneViewPanel.java,v 1.21 2001/10/24 00:55:08 shaper Exp $
|
||||
// $Id: ViewerSceneViewPanel.java,v 1.22 2001/10/25 22:08:29 mdb Exp $
|
||||
|
||||
package com.threerings.miso.viewer;
|
||||
|
||||
@@ -12,6 +12,8 @@ import com.samskivert.util.Config;
|
||||
|
||||
import com.threerings.media.sprite.*;
|
||||
import com.threerings.media.util.RandomUtil;
|
||||
import com.threerings.media.util.PerformanceMonitor;
|
||||
import com.threerings.media.util.PerformanceObserver;
|
||||
|
||||
import com.threerings.miso.Log;
|
||||
import com.threerings.miso.scene.*;
|
||||
|
||||
Reference in New Issue
Block a user