Example usage for org.jfree.data.time FixedMillisecond next

List of usage examples for org.jfree.data.time FixedMillisecond next

Introduction

In this page you can find the example usage for org.jfree.data.time FixedMillisecond next.

Prototype

@Override
public RegularTimePeriod next() 

Source Link

Document

Returns the millisecond following this one.

Usage

From source file:org.jfree.chart.demo.PerformanceTest1.java

public static void main4(String as[]) {
    TimeSeries timeseries = new TimeSeries("Test");
    timeseries.setMaximumItemCount(4000);
    FixedMillisecond fixedmillisecond = new FixedMillisecond();
    for (int i = 0; i < 40000; i++) {
        long l = System.currentTimeMillis();
        for (int j = 0; j < 400; j++) {
            fixedmillisecond = (FixedMillisecond) fixedmillisecond.next();
            timeseries.add(fixedmillisecond, Math.random());
        }// w  w  w .  j a v a2s  . co m

        long l1 = System.currentTimeMillis();
        System.out.println(i + " --> " + (l1 - l) + " (" + Runtime.getRuntime().freeMemory() + " / "
                + Runtime.getRuntime().totalMemory() + ")");
    }

}