/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }
/** * @return the average time period that elapses between counter increments * since the last reset. */ public double getPeriod() { double count = getCount(); if (count == 0) { return 0; } double time = System.currentTimeMillis() - getStartTime(); return time / (count * 1000.0); }
/** * @return the number of times per second that the counter is incrementing * since the last reset. */ public double getFrequency() { double count = getCount(); double time = System.currentTimeMillis() - getStartTime(); return count * 1000.0 / time; }