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;
|
package com.threerings.media.sprite;
|
||||||
|
|
||||||
@@ -12,8 +12,8 @@ import com.samskivert.util.Interval;
|
|||||||
import com.samskivert.util.IntervalManager;
|
import com.samskivert.util.IntervalManager;
|
||||||
|
|
||||||
import com.threerings.media.Log;
|
import com.threerings.media.Log;
|
||||||
import com.threerings.miso.util.PerformanceMonitor;
|
import com.threerings.media.util.PerformanceMonitor;
|
||||||
import com.threerings.miso.util.PerformanceObserver;
|
import com.threerings.media.util.PerformanceObserver;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The AnimationManager handles the regular refreshing of the scene
|
* 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 java.util.HashMap;
|
||||||
|
|
||||||
import com.threerings.miso.Log;
|
import com.threerings.media.Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <code>PerformanceMonitor</code> class provides a simple
|
* Provides a simple mechanism for monitoring the number of times an
|
||||||
* mechanism for monitoring the number of times an action takes place
|
* action takes place within a certain time period.
|
||||||
* within a certain time period.
|
|
||||||
*
|
*
|
||||||
* <p> The action being tracked should be registered with a suitable
|
* <p> The action being tracked should be registered with a suitable name
|
||||||
* name via <code>register()</code>, and <code>tick()</code> should be
|
* via {@link #register}, and {@link #tick} should be called each time the
|
||||||
* called each time the action is performed.
|
* action is performed.
|
||||||
*
|
*
|
||||||
* <p> Whenever <code>tick()</code> is called and the checkpoint time
|
* <p> Whenever {@link #tick} is called and the checkpoint time interval
|
||||||
* interval has elapsed since the last checkpoint (if any), the
|
* has elapsed since the last checkpoint (if any), the observer will be
|
||||||
* observer will be notified to that effect by a call to
|
* notified to that effect by a call to {@link
|
||||||
* <code>PerformanceObserver.checkpoint()</code>.
|
* PerformanceObserver#checkpoint}.
|
||||||
*
|
*
|
||||||
* <p> Note that this is <em>not</em> intended to be used as an
|
* <p> Note that this is <em>not</em> intended to be used as an
|
||||||
* industrial-strength profiling or performance monitoring tool. The
|
* industrial-strength profiling or performance monitoring tool. The
|
||||||
* checkpoint time interval granularity is in milliseconds, not
|
* checkpoint time interval granularity is in milliseconds, not
|
||||||
* microseconds, and the observer's <code>checkpoint()</code> method
|
* microseconds, and the observer's <code>checkpoint()</code> method will
|
||||||
* will never be called until/unless a subsequent call to
|
* never be called until/unless a subsequent call to {@link #tick} is made
|
||||||
* <code>tick()</code> is made after the requested number of
|
* after the requested number of milliseconds have passed since the last
|
||||||
* milliseconds have passed since the last checkpoint.
|
* checkpoint.
|
||||||
*/
|
*/
|
||||||
public class PerformanceMonitor
|
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
|
* This interface should be implemented by classes that wish to register
|
||||||
* implemented by classes that wish to register actions to be
|
* actions to be monitored by the {@link PerformanceMonitor} class.
|
||||||
* monitored by the <code>PerformanceMonitor</code> class.
|
|
||||||
*/
|
*/
|
||||||
public interface PerformanceObserver
|
public interface PerformanceObserver
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* This method is called by the <code>PerformanceMonitor</code>
|
* This method is called by the {@link PerformanceMonitor} class
|
||||||
* class whenever an action's requested time interval between
|
* whenever an action's requested time interval between checkpoints
|
||||||
* checkpoints has expired.
|
* has expired.
|
||||||
*
|
*
|
||||||
* @param name the action name.
|
* @param name the action name.
|
||||||
* @param ticks the ticks since the last checkpoint.
|
* @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;
|
package com.threerings.miso.viewer;
|
||||||
|
|
||||||
@@ -12,6 +12,8 @@ import com.samskivert.util.Config;
|
|||||||
|
|
||||||
import com.threerings.media.sprite.*;
|
import com.threerings.media.sprite.*;
|
||||||
import com.threerings.media.util.RandomUtil;
|
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.Log;
|
||||||
import com.threerings.miso.scene.*;
|
import com.threerings.miso.scene.*;
|
||||||
|
|||||||
Reference in New Issue
Block a user