/** * Returns the same result as {@link System#currentTimeMillis()}, but as a * double. Because emulated long math is significantly slower than doubles in * Production Mode, this method is to be preferred. */ public static double currentTimeMillis() { return JsDate.now(); }
/** * Returns the same result as {@link System#currentTimeMillis()}, but as a * double. Because emulated long math is significantly slower than doubles in * Production Mode, this method is to be preferred. */ public static double currentTimeMillis() { return JsDate.now(); }
/** * Returns the same result as {@link System#currentTimeMillis()}, but as a * double. Because emulated long math is significantly slower than doubles in * Production Mode, this method is to be preferred. */ public static double currentTimeMillis() { return JsDate.now(); }
/** * Returns the same result as {@link System#currentTimeMillis()}, but as a * double. Because emulated long math is significantly slower than doubles in * Production Mode, this method is to be preferred. */ public static double currentTimeMillis() { return JsDate.now(); }
private double currentTimeMillis() { if(GWT.isClient()) { return JsDate.now(); } else { return System.currentTimeMillis(); } }
@Override public void onNext(T v) { double now = JsDate.now(); if (lastOnNext == 0 || now - lastOnNext >= timeInMilliseconds) { lastOnNext = now; last = null; child.onNext(v); } else { if (last == null) { // wait till timer fires, this is faster than re-schedule on each element scheduler.scheduleFixedDelay(action, timeInMilliseconds); } last = v; } }