Example usage for com.badlogic.gdx.utils PerformanceCounter start

List of usage examples for com.badlogic.gdx.utils PerformanceCounter start

Introduction

In this page you can find the example usage for com.badlogic.gdx.utils PerformanceCounter start.

Prototype

public void start() 

Source Link

Document

Start counting, call this method just before performing the task you want to keep track of.

Usage

From source file:com.ore.infinium.World.java

License:Open Source License

private void generateWorld() {
    PerformanceCounter counter = new PerformanceCounter("test");
    counter.start();

    generateOres();/*from  w  w  w  .j  a  va  2s.c om*/
    generateGrassTiles();
    transitionTiles();

    counter.stop();
    String s = String.format("total world gen took (incl transitioning, etc): %s seconds", counter.current);
    Gdx.app.log("", s);

}