@Override
    public void setCurrentTimestamp(long timestamp) {
        if (timestamp >= this.lastEventTimestamp) {
            synchronized (this) {
                if (timestamp >= this.lastEventTimestamp) {
                    // Update the time only if the time is greater than or equal to previous time
                    this.lastEventTimestamp = timestamp;

                    // Send a notification to listeners - Scheduler
                    for (TimestampGeneratorImpl.TimeChangeListener listener : this.timeChangeListeners) {
                        listener.onTimeChange(this.lastEventTimestamp);
                    }
                }
                // Schedule the heartbeat from the current event timestamp
                this.lastSystemTimestamp = System.currentTimeMillis();
                notifyAfter(idleTime);
            }
        }
    }
Set the timestamp and notify the interested listeners.

@param timestamp the timestamp to the {@link TimestampGenerator}
modules/siddhi-core/src/main/java/io/siddhi/core/util/timestamp/TimestampGeneratorImpl.java