private void notifyAfter(long duration) {
        if (!heartbeatRunning && idleTime != -1) {
            // Start the heartbeat if this is the first time
            scheduledExecutorService.schedule(timeInjector, duration, TimeUnit.MILLISECONDS);
            heartbeatRunning = true;
        }
    }
This method must be called within a synchronized block to avoid multiple schedulers from running simultaneously.

@param duration delay the time from now to delay execution
modules/siddhi-core/src/main/java/io/siddhi/core/util/timestamp/TimestampGeneratorImpl.java