Package org.uncommons.watchmaker.framework.termination

Examples of org.uncommons.watchmaker.framework.termination.ElapsedTime


                    requestThread.interrupt();
                }
            }
        });
        long startTime = System.currentTimeMillis();
        engine.evolve(10, 0, new ElapsedTime(timeout));
        long elapsedTime = System.currentTimeMillis() - startTime;
        assert Thread.interrupted() : "Thread was not interrupted before timeout.";
        assert elapsedTime < timeout : "Engine did not respond to interrupt before timeout.";
        assert engine.getSatisfiedTerminationConditions().isEmpty()
            : "Interrupted engine should have no satisfied termination conditions.";
View Full Code Here



            public void islandPopulationUpdate(int islandIndex, PopulationData<? extends Integer> populationData){}
        });
        long startTime = System.currentTimeMillis();
        islandEvolution.evolve(10, 0, 10, 0, new ElapsedTime(timeout));
        long elapsedTime = System.currentTimeMillis() - startTime;
        assert Thread.interrupted() : "Thread was not interrupted before timeout.";
        assert elapsedTime < timeout : "Engine did not respond to interrupt before timeout.";
        assert islandEvolution.getSatisfiedTerminationConditions().isEmpty()
            : "Interrupted islands should have no satisfied termination conditions.";
View Full Code Here

TOP

Related Classes of org.uncommons.watchmaker.framework.termination.ElapsedTime

Copyright © 2018 www.massapicom. 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.