@Override public Timed<T> apply(T t) throws Exception { return new Timed<T>(t, scheduler.now(unit), unit); } }
@Override Object enterTransform(Object value) { return new Timed<Object>(value, scheduler.now(unit), unit); }
@Override public Timed<T> apply(T t) throws Exception { return new Timed<T>(t, scheduler.now(unit), unit); } }
@Override public void onSubscribe(Subscription s) { if (SubscriptionHelper.validate(this.s, s)) { lastTime = scheduler.now(unit); this.s = s; actual.onSubscribe(this); } }
@Override public Timed<T> apply(T t) throws Exception { return new Timed<T>(t, scheduler.now(unit), unit); } }
@Override public void onNext(T t) { long now = scheduler.now(unit); long last = lastTime; lastTime = now; long delta = now - last; actual.onNext(new Timed<T>(t, delta, unit)); }
@Override public void onNext(T t) { final SpscLinkedArrayQueue<Object> q = queue; long now = scheduler.now(unit); q.offer(now, t); drain(); }
@Override public void onNext(T t) { final SpscLinkedArrayQueue<Object> q = queue; long now = scheduler.now(unit); q.offer(now, t); drain(); }
@Override public void onNext(T t) { final SpscLinkedArrayQueue<Object> q = queue; long now = scheduler.now(unit); q.offer(now, t); trim(now, q); }
@Override public void onError(Throwable t) { if (delayError) { trim(scheduler.now(unit), queue); } error = t; done = true; drain(); }
@Override public void onSubscribe(Disposable s) { if (DisposableHelper.validate(this.s, s)) { this.s = s; lastTime = scheduler.now(unit); actual.onSubscribe(this); } }
@Override public void onNext(T t) { long now = scheduler.now(unit); long last = lastTime; lastTime = now; long delta = now - last; actual.onNext(new Timed<T>(t, delta, unit)); }
@Override public void onComplete() { trim(scheduler.now(unit), queue); done = true; drain(); }
@Override public void onNext(T t) { long now = scheduler.now(unit); queue.offer(now, t); drain(); }
@Override public void onSubscribe(Disposable s) { if (DisposableHelper.validate(this.s, s)) { this.s = s; lastTime = scheduler.now(unit); actual.onSubscribe(this); } }
@Override public void onNext(T t) { long now = scheduler.now(unit); long last = lastTime; lastTime = now; long delta = now - last; actual.onNext(new Timed<T>(t, delta, unit)); }
@Override public void add(T value) { TimedNode<Object> n = new TimedNode<Object>(value, scheduler.now(unit)); TimedNode<Object> t = tail; tail = n; size++; t.set(n); // releases both the tail and size trim(); }
@Override public void add(T value) { TimedNode<Object> n = new TimedNode<Object>(value, scheduler.now(unit)); TimedNode<Object> t = tail; tail = n; size++; t.set(n); // releases both the tail and size trim(); }
@Override public void add(T value) { TimedNode<Object> n = new TimedNode<Object>(value, scheduler.now(unit)); TimedNode<Object> t = tail; tail = n; size++; t.set(n); // releases both the tail and size trim(); }
@Override public long now(@NonNull TimeUnit unit) { return super.now(unit) + unit.convert(drift, TimeUnit.NANOSECONDS); } }