Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How use millis() in static methods?

$
0
0

Hello, I want to calculate the time within the Serialevent Methode.

static class SerialPortReader implements SerialPortEventListener {

    public void serialEvent(SerialPortEvent event) {
        startLoop = millis();
        ...
        ...
        long endLoop = millis();
        println("Looptime = "+(endLoop - startLoop));

    }// End of serialEvent
}// End of SerialPortReader

I'm not static friendly :)) ;)


Viewing all articles
Browse latest Browse all 2896

Trending Articles