/** * Sets the current document time. */ public float setCurrentTime(float t) { boolean p = pauseTime != 0; unpause(); Calendar begin = timedDocumentRoot.getDocumentBeginTime(); float now = timedDocumentRoot.convertEpochTime(System.currentTimeMillis()); begin.add(Calendar.MILLISECOND, (int) ((now - t) * 1000)); if (p) { pause(); } return tick(t, true); }
/** * Sets the current document time. */ public float setCurrentTime(float t) { boolean p = pauseTime != 0; unpause(); Calendar begin = timedDocumentRoot.getDocumentBeginTime(); float now = timedDocumentRoot.convertEpochTime(System.currentTimeMillis()); begin.add(Calendar.MILLISECOND, (int) ((now - t) * 1000)); if (p) { pause(); } return tick(t, true); }
/** * Sets the current document time. */ public float setCurrentTime(float t) { boolean p = pauseTime != 0; unpause(); Calendar begin = timedDocumentRoot.getDocumentBeginTime(); float now = timedDocumentRoot.convertEpochTime(System.currentTimeMillis()); begin.add(Calendar.MILLISECOND, (int) ((now - t) * 1000)); if (p) { pause(); } return tick(t, true); }