Examples of currentTimeMillis()


Examples of com.amazonaws.services.simpleworkflow.flow.WorkflowClock.currentTimeMillis()

    }

    @Override
    public Object execute() throws Throwable {
        WorkflowClock clock = contextProvider.getDecisionContext().getWorkflowClock();
        scheduleWithRetry(null, 1, clock.currentTimeMillis(), 0, clock);
        return null;
    }
   
    private void scheduleWithRetry(final Throwable failure, final int attempt,
            final long firstAttemptTime, final long timeOfRecordedFailure, final WorkflowClock clock) throws Throwable {
View Full Code Here

Examples of com.amazonaws.services.simpleworkflow.flow.WorkflowClock.currentTimeMillis()

    @Override
    public Object execute() throws Throwable {
        Settable<Object> result = new Settable<Object>();
        WorkflowClock clock = contextProvider.getDecisionContext().getWorkflowClock();
        scheduleWithRetry(result, null, 1, clock.currentTimeMillis(),
                0, clock);
        return result;
    }
   
    private void scheduleWithRetry(final Settable<Object> result, final Throwable failure, final int attempt,
View Full Code Here

Examples of com.firefly.utils.time.TimeProvider.currentTimeMillis()

    new TimerWheelExample().test();
    TimeProvider t = new TimeProvider(1000L);
    t.start();
   
    Thread.sleep(1000L);
    long start = t.currentTimeMillis();
    Thread.sleep(5000L);
    System.out.println("TimeProvider: " + (t.currentTimeMillis() - start));
  }
}
View Full Code Here

Examples of com.firefly.utils.time.TimeProvider.currentTimeMillis()

    t.start();
   
    Thread.sleep(1000L);
    long start = t.currentTimeMillis();
    Thread.sleep(5000L);
    System.out.println("TimeProvider: " + (t.currentTimeMillis() - start));
  }
}
View Full Code Here

Examples of com.firefly.utils.time.TimeProvider.currentTimeMillis()

    new TimerWheelExample().test();
    TimeProvider t = new TimeProvider(1000L);
    t.start();
   
    Thread.sleep(1000L);
    long start = t.currentTimeMillis();
    Thread.sleep(5000L);
    System.out.println("TimeProvider: " + (t.currentTimeMillis() - start));
  }
 
  public static void main(String[] args) {
View Full Code Here

Examples of com.firefly.utils.time.TimeProvider.currentTimeMillis()

    t.start();
   
    Thread.sleep(1000L);
    long start = t.currentTimeMillis();
    Thread.sleep(5000L);
    System.out.println("TimeProvider: " + (t.currentTimeMillis() - start));
  }
 
  public static void main(String[] args) {
    final HashTimeWheel t = new HashTimeWheel();
    t.setMaxTimers(5);
View Full Code Here

Examples of com.google.dataconnector.util.ClockUtil.currentTimeMillis()

  }

  public void testDispatchAndNormalCheck() throws Exception {

    ClockUtil clock = EasyMock.createMock(ClockUtil.class);
    clock.currentTimeMillis();
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // dispatch
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // before loop
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // creating HCI to send to server
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP + 15000); // checking response time + 15 sec
    // We throw an exception to break out of the loop.  This is called at the log.trace.
View Full Code Here

Examples of com.google.dataconnector.util.ClockUtil.currentTimeMillis()

    fail("did not recieve runtime exception");
  }

  public void testDispatchAndHealthCheckTimeout() throws Exception {
    ClockUtil clock = EasyMock.createMock(ClockUtil.class);
    clock.currentTimeMillis();
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // dispatch
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // before loop
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP); // creating HCI to send to server
    // Setup health check fail.
    EasyMock.expectLastCall().andReturn(FAKE_TIME_STAMP + 45000); // checking response time + 45 sec
View Full Code Here

Examples of hirondelle.web4j.util.TimeSource.currentTimeMillis()

  
   <P>Only millisecond precision is possible for this method.
   */
  public static DateTime now(TimeZone aTimeZone) {
    TimeSource timesource = BuildImpl.forTimeSource();
    return forInstant(timesource.currentTimeMillis(), aTimeZone);
  }

  /**
   Return the current date.
   <P>As in {@link #now(TimeZone)}, but truncates the time portion, leaving only year-month-day.
View Full Code Here

Examples of org.apache.flume.Clock.currentTimeMillis()

  public void testDateRace() {
    Clock mockClock = mock(Clock.class);
    DateTimeFormatter parser = ISODateTimeFormat.dateTimeParser();
    long two = parser.parseMillis("2013-04-21T02:59:59-00:00");
    long three = parser.parseMillis("2013-04-21T03:00:00-00:00");
    when(mockClock.currentTimeMillis()).thenReturn(two, three);

    // save & modify static state (yuck)
    Clock origClock = BucketPath.getClock();
    BucketPath.setClock(mockClock);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.