Class 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)
    • Constructor Detail

      • EggClock

        public EggClock​(String preFix,
                        String postFix)
    • 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 - if true, 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 - if true, 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 - if true, 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 - if true, also a newline is added.