getDeltaTime processing code example
Example: processing deltatime
float deltaTime;
long time;
void setup(){
// do your setup stuff...
time = millis();
}
void draw(){
long currentTime = millis();
// get deltaTime in seconds.
deltaTime = (currentTime - time) * 0.001f;
// do your drawing stuff...
//Update time in preparation for next frame.
time = currentTime;
}