@Override
    public int compareTo(TimerKey<K> o) {
      final int timeCompare = Long.compare(time, o.time);
      if (timeCompare != 0) {
        return timeCompare;
      }

      return key.hashCode() - o.key.hashCode();
    }
For run loop to listen to timer firing so it can schedule the callbacks.
samza-core/src/main/java/org/apache/samza/scheduler/EpochTimeScheduler.java