backtype.storm.utils.Time Java Examples

The following examples show how to use backtype.storm.utils.Time. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TimeUtils.java    From senti-storm with Apache License 2.0 5 votes vote down vote up
public static void sleepMillis(long millis) {
  try {
    Time.sleep(millis);
  } catch (InterruptedException e) {
    throw new RuntimeException(e);
  }
}
 
Example #2
Source File: NthLastModifiedTimeTracker.java    From flink-perf with Apache License 2.0 4 votes vote down vote up
private long now() {
  return Time.currentTimeMillis();
}
 
Example #3
Source File: NthLastModifiedTimeTracker.java    From jstorm with Apache License 2.0 4 votes vote down vote up
private long now() {
    return Time.currentTimeMillis();
}
 
Example #4
Source File: TimeUtils.java    From jstorm with Apache License 2.0 4 votes vote down vote up
/**
 * Take care of int overflow
 */
public static int current_time_secs() {
    return (int) (Time.currentTimeMillis() / 1000);
}
 
Example #5
Source File: AsyncLoopThread.java    From jstorm with Apache License 2.0 4 votes vote down vote up
@Override
public Boolean isSleeping() {
    return Time.isThreadWaiting(thread);
}