Java Time Print printTimeStamp(final String msg)

Here you can find the source of printTimeStamp(final String msg)

Description

Monitor time between calls.

License

Open Source License

Declaration

public static void printTimeStamp(final String msg) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /** XConfiguration management verbosity.*/
    public static final boolean performances = true;
    /** Last current time.*/
    protected static long time = System.currentTimeMillis();

    /**//from   w w w  .  ja va2  s  . c  o  m
     * Monitor time between calls.
     */
    public static void printTimeStamp(final String msg) {
        long nextTime = System.currentTimeMillis();
        long deltaTime = nextTime - time;
        if (performances) {
            System.out.println((msg.startsWith("*") ? "" : " |  ") + msg + " in " + deltaTime + " ms.");
        }
        time = nextTime;
    }
}

Related

  1. printTime(long time, String spacer)
  2. printTime(String msg)
  3. printTimer(String blah)
  4. printTimes(String what, long... args)
  5. printTimestamp()
  6. printTimeTakenMs(String msg, long start, long finish)
  7. standardTime(Date date)