Class EggClock
- java.lang.Object
-
- org.hortonmachine.gears.utils.time.EggClock
-
public class EggClock extends Object
A simple time print utility.EggClock timer = new EggClock("Time check: ", " min\n"); timer.start(); -> do some stuff here timer.printTimePassedInMinutes(System.err);- Since:
- 0.7.6
- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprintSubTimePassedInMinutes(PrintStream pm)Prints the passed interval in minutes (rounded) from the sub counter start to the out stream.voidprintSubTimePassedInSeconds(PrintStream pm)Prints the passed interval in seconds (rounded) from the sub counter start to the out stream.voidprintTimePassedInMinutes(PrintStream pm)Prints the passed interval in minutes (rounded) to the out stream.voidprintTimePassedInSeconds(PrintStream pm)Prints the passed interval in seconds (rounded) to the out stream.voidstart()voidstartAndPrint(PrintStream pm)voidstartSub()Starts a sub counter.
-
-
-
Method Detail
-
start
public void start()
-
startAndPrint
public void startAndPrint(PrintStream pm)
-
printTimePassedInMinutes
public void printTimePassedInMinutes(PrintStream pm)
Prints the passed interval in minutes (rounded) to the out stream.- Parameters:
pm- the stream to which to print to.newLine- iftrue, also a newline is added.
-
printTimePassedInSeconds
public void printTimePassedInSeconds(PrintStream pm)
Prints the passed interval in seconds (rounded) to the out stream.- Parameters:
pm- the stream to which to print to.newLine- iftrue, also a newline is added.
-
startSub
public void startSub()
Starts a sub counter.
-
printSubTimePassedInMinutes
public void printSubTimePassedInMinutes(PrintStream pm)
Prints the passed interval in minutes (rounded) from the sub counter start to the out stream.- Parameters:
pm- the stream to which to print to.newLine- iftrue, also a newline is added.
-
printSubTimePassedInSeconds
public void printSubTimePassedInSeconds(PrintStream pm)
Prints the passed interval in seconds (rounded) from the sub counter start to the out stream.- Parameters:
pm- the stream to which to print to.newLine- iftrue, also a newline is added.
-
-