public synchronized long getLapTime() { return this.watch.getLapTime(); }
public long getLapTime() { return watch.getLapTime(); }
/** * Get the average <i>lap</i> time since the watch was started. * * @return Average <i>lap</i> time since the watch was started. */ public long getAverageLapTime() { return (count == 0) ? 0 : getLapTime() / getLapCount(); }
/** * Return a string representation. */ public String toString() { StringBuffer buff = new StringBuffer(); if (running) { // the watch has not been stopped formatElapsedTime(buff, getTime()); // add the current lap time too if there is more than one lap if (count >= 1) { buff.append(", count=").append(count); buff.append(", current="); formatElapsedTime(buff, getLapTime()); } } else { // the watch has been stopped formatElapsedTime(buff, getTime()); // add extra info if there is more than one lap if (count > 1) { buff.append(", count=").append(count); buff.append(", average="); formatElapsedTime(buff, getAverageLapTime()); } } return buff.toString(); }
msg.setUserData(new Long(watch.getLapTime())); sendNotification(msg);
msg.setUserData(new Long(watch.getLapTime())); sendNotification(msg);
KernelEvent startEvent = new AbstractEvent(eventMgr, START_NOTIFICATION_TYPE, 0, System.currentTimeMillis(), new Long(watch.getLapTime())); eventMgr.fireKernelEvent(startEvent);
KernelEvent startEvent = new AbstractEvent(eventMgr, START_NOTIFICATION_TYPE, 0, System.currentTimeMillis(), new Long(watch.getLapTime())); eventMgr.fireKernelEvent(startEvent);