Documentation of 'cc.mallet.util.Timing' Java class
Timing
cc.mallet.util

Class Timing



  • public class Timing
    extends java.lang.Object
    A class for timing things. Originally inspired by the Timing class in the Stanford NLP cade, but completely rewritten.

    Created: Dec 30, 2004

    • Constructor Summary

      Constructors 
      Constructor and Description
      Timing() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      long elapsedTime()
      Returns how much time as passed since Object creation, or the most recent call to tick().
      long report(java.lang.String msg)
      Like tick(), but doesn't reset the counter.
      long tick(java.lang.String msg)
      Print to System.out how much time has passed, resetting this Timing's start time to the current time.
      long totalElapsedTime()
      Returns the number of milliseconds since this object was created.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Timing

        public Timing()
    • Method Detail

      • tick

        public long tick(java.lang.String msg)
        Print to System.out how much time has passed, resetting this Timing's start time to the current time. Time is measured from the most recent tick call, or when this object was created.
        Parameters:
        msg - Prefix of string printed with time
        Returns:
        Number of elapsed milliseconds from tick (or start)
      • elapsedTime

        public long elapsedTime()
        Returns how much time as passed since Object creation, or the most recent call to tick().
        Returns:
        Number of elapsed milliseconds
      • totalElapsedTime

        public long totalElapsedTime()
        Returns the number of milliseconds since this object was created. Ignores previous calls to tick, unlike elapsedTime and tick.
      • report

        public long report(java.lang.String msg)
        Like tick(), but doesn't reset the counter.

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.