Package javafx.beans.property

Examples of javafx.beans.property.LongProperty


    public static void main(String[] args) {
        int n = 40;

        FibTest eagerTest = new FibTest(n);
        LongProperty eagerResult = new SimpleLongProperty();
        eagerTest.setupFor(eagerResult);

        FibTest lazyTest = new FibTest(n);
        org.reactfx.inhibeans.property.SimpleLongProperty lazyResult =
                new org.reactfx.inhibeans.property.SimpleLongProperty();
        lazyTest.setupFor(lazyResult);

        long t1 = System.currentTimeMillis();
        eagerTest.run();
        long t2 = System.currentTimeMillis();
        double eagerTime = (t2-t1)/1000.0;

        t1 = System.currentTimeMillis();
        Guard g = lazyResult.block();
        lazyTest.run();
        g.close();
        t2 = System.currentTimeMillis();
        double lazyTime = (t2-t1)/1000.0;

        System.out.println("EAGER TEST:");
        System.out.println("    fib_" + n + " = " + eagerResult.get());
        System.out.println("    result invalidations: " + eagerTest.invalidationCount);
        System.out.println("    duration: " + eagerTime + " seconds");
        System.out.println();
        System.out.println("LAZY TEST:");
        System.out.println("    fib_" + n + " = " + lazyResult.get());
View Full Code Here

TOP

Related Classes of javafx.beans.property.LongProperty

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.