Click or drag to resize

EPEventServiceTimeControl Interface

Service for advancing and controlling time.

Namespace:  com.espertech.esper.runtime.client
Assembly:  NEsper.Runtime (in NEsper.Runtime.dll) Version: 8.0.0.0
Syntax
C#
public interface EPEventServiceTimeControl

The EPEventServiceTimeControl type exposes the following members.

Properties
  NameDescription
Public propertyCurrentTime
Returns current engine time.

If time is provided externally via timer events, the function returns current time as externally provided.

Public propertyNextScheduledTime
Returns the time at which the next schedule execution is expected, returns null if no schedule execution is outstanding.
Top
Methods
  NameDescription
Public methodAdvanceTime
Advance time by jumping to the given time in milliseconds (or nanoseconds if so configured).

For externally controlling the time within a runtime.

External clocking must be first be enabled by configuration {@link com.espertech.esper.common.client.configuration.Runtime.ConfigurationRuntimeThreading.IsInternalTimerEnabled} passing false or by calling {@link #clockExternal()}.

Time should never move backwards (unless for testing purposes where previous results can be thrown away)

Public methodAdvanceTimeSpan(Int64)
Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the smallest resolution (non-hopping).

For externally controlling the time within a runtime.

External clocking must be first be enabled by configuration {@link com.espertech.esper.common.client.configuration.Runtime.ConfigurationRuntimeThreading.IsInternalTimerEnabled} passing false or by calling {@link #clockExternal()}.

Time should never move backwards (unless for testing purposes where previous results can be thrown away)

Public methodAdvanceTimeSpan(Int64, Int64)
Advance time by continually-sliding to the given time in milliseconds (or nanoseconds if so configured) at the provided resolution (hopping).

For externally controlling the time within a runtime.

External clocking must be first be enabled by configuration {@link com.espertech.esper.common.client.configuration.Runtime.ConfigurationRuntimeThreading.IsInternalTimerEnabled} passing false or by calling {@link #clockExternal()}.

Time should never move backwards (unless for testing purposes where previous results can be thrown away)

Public methodClockExternal
Switches off the internal timer which tracks system time. There is no effect if the runtime is already on external internal time.

Your application may want to use {@link #advanceTime(long)}, {@link #advanceTimeSpan(long)} or {@link #advanceTimeSpan(long, long)} after calling this method to set or advance time.

Its generally preferable to turn off internal clocking (and thus turn on external clocking) by configuration {@link com.espertech.esper.common.client.configuration.Runtime.ConfigurationRuntimeThreading.IsInternalTimerEnabled} passing false.

Public methodClockInternal
Switches on the internal timer which tracks system time. There is no effect if the runtime is already on internal time.

Your application may not want to use {@link #advanceTime(long)}, {@link #advanceTimeSpan(long)} or {@link #advanceTimeSpan(long, long)} after calling this method, since time advances according to JVM time.

Public methodIsExternalClockingEnabled
Returns true for external clocking, false for internal clocking.
Top
See Also