/** * Returns the elapsed time in seconds; does not stop the timer, if started. */ public float seconds() { return ((float) millis()) / UNIT; } /**
/** * Returns the elapsed time in seconds; does not stop the timer, if started. */ public float seconds() { return ((float) millis()) / UNIT; } /**
/** * <tt>T = this + other</tt>; Constructs and returns a new timer which is the sum of the receiver and the other timer. * The new timer is not started. * @param other the timer to add. * @return a new timer. */ public Timer plus(Timer other) { Timer copy = new Timer(); copy.elapsedTime = millis() + other.millis(); return copy; } /**
/** * <tt>T = this - other</tt>; Constructs and returns a new timer which is the difference of the receiver and the other timer. * The new timer is not started. * @param other the timer to subtract. * @return a new timer. */ public Timer minus(Timer other) { Timer copy = new Timer(); copy.elapsedTime = millis() - other.millis(); return copy; } /**
/** * <tt>T = this + other</tt>; Constructs and returns a new timer which is the sum of the receiver and the other timer. * The new timer is not started. * @param other the timer to add. * @return a new timer. */ public Timer plus(Timer other) { Timer copy = new Timer(); copy.elapsedTime = millis() + other.millis(); return copy; } /**
/** * <tt>T = this - other</tt>; Constructs and returns a new timer which is the difference of the receiver and the other timer. * The new timer is not started. * @param other the timer to subtract. * @return a new timer. */ public Timer minus(Timer other) { Timer copy = new Timer(); copy.elapsedTime = millis() - other.millis(); return copy; } /**
int p = B.rows(); int reps = runs; double mflops = 1.0e-3*(2.0*m*n*p*reps)/timer3.millis(); System.out.println("mflops: "+mflops);
int p = B.rows(); int reps = runs; double mflops = 1.0e-3*(2.0*m*n*p*reps)/timer3.millis(); System.out.println("mflops: "+mflops);