Hi! Not sure what you mean with execution time of one program, as Processing programs often stay running until you close them. This can be used to measure execution time of parts of your program:
long t = System.currentTimeMillis();
// do slow stuff
println(System.currentTimeMillis() - t);
With this you can find out for how long the program has run until you press ESC:
void keyPressed() {
if(key == ESC) {
println(millis());
}
}
Or did you have something else in mind?