Top Description Inners Fields Constructors Methods
rx.internal.schedulers

public final Class SchedulePeriodicHelper

extends Object
Class Inheritance
Imports
java.util.concurrent.TimeUnit, rx.Scheduler.Worker, .Subscription, rx.functions.Action0, rx.internal.subscriptions.SequentialSubscription

Utility method for scheduling tasks periodically (at a fixed rate) by using Worker.schedule(Action0, long, TimeUnit).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
SchedulePeriodicHelper.NowNanoSupplier

Return the current time in nanoseconds.

Field Summary

Modifier and TypeField and Description
public static final long
CLOCK_DRIFT_TOLERANCE_NANOS

The tolerance for a clock drift in nanoseconds where the periodic scheduler will rebase.

Constructor Summary

AccessConstructor and Description
private
SchedulePeriodicHelper()

Utility class.

Method Summary

Modifier and TypeMethod and Description
public static Subscription
schedulePeriodically(final Scheduler.Worker worker, final Action0 action, long initialDelay, long period, TimeUnit unit, final SchedulePeriodicHelper.NowNanoSupplier nowNanoSupplier)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLOCK_DRIFT_TOLERANCE_NANOSback to summary
public static final long CLOCK_DRIFT_TOLERANCE_NANOS

The tolerance for a clock drift in nanoseconds where the periodic scheduler will rebase.

The associated system parameter, rx.scheduler.drift-tolerance, expects its value in minutes.

Constructor Detail

SchedulePeriodicHelperback to summary
private SchedulePeriodicHelper()

Utility class.

Method Detail

schedulePeriodicallyback to summary
public static Subscription schedulePeriodically(final Scheduler.Worker worker, final Action0 action, long initialDelay, long period, TimeUnit unit, final SchedulePeriodicHelper.NowNanoSupplier nowNanoSupplier)
rx.internal.schedulers back to summary

public Interface SchedulePeriodicHelper.NowNanoSupplier

Known Direct Implementers
rx.schedulers.TestScheduler.InnerTestScheduler

Return the current time in nanoseconds.

Method Summary

Modifier and TypeMethod and Description
public long

Method Detail

nowNanosback to summary
public long nowNanos()