Code example for String

Methods: valueOf

0
 * @param out output stream to write info to. 
 */ 
public void print(PrintStream out)
{ 
    if (mStarts == 0) {
        out.println(mName + " never started.");
        return; 
    } 
     
    if (mState == State.RUNNING) out.print("WARNING:  timer still running!  ");
    out.print(mName + ": ");
    double t = mNanosecs / 1000000000.0;
    out.print(t);
    out.print(".  Run ");
    out.print(mStarts);
    out.print(" times, average run time ");
    long avg = mNanosecs / mStarts;
    t = avg / 1000000000.0;
    out.print(t);
    out.println(".");
}