Examples of TLongArrayList


Examples of gnu.trove.list.array.TLongArrayList

    ListenerSupport<Runnable,?> listeners = ListenerSupport.forType( Runnable.class )
      .asynchronous()
      .delay( 5, TimeUnit.SECONDS )
      .build();

    TLongList call_times = TCollections.synchronizedList( new TLongArrayList() );
    listeners.add( () -> call_times.add( System.currentTimeMillis() ) );

    long call1_time = System.currentTimeMillis();
    listeners.dispatch().run(); // Lands at T + 5
View Full Code Here

Examples of gnu.trove.list.array.TLongArrayList

  public void testDelaySync() {
    ListenerSupport<Runnable,?> listeners = ListenerSupport.forType( Runnable.class )
      .delay( 5, TimeUnit.SECONDS )
      .build();

    TLongList call_times = TCollections.synchronizedList( new TLongArrayList() );
    listeners.add( () -> call_times.add( System.currentTimeMillis() ) );

    long call1_time = System.currentTimeMillis();
    listeners.dispatch().run();
    assertEquals( "Expected one time: " + call_times, 1, call_times.size() );
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.