The following code get the number of milliseconds a program has run using millis(), then print to the text area of the Processing environment's console using println().
void setup() {
size(300, 200);
}
void draw() {
int t = int(millis());
println(t);
}
![Print the time of the program has run Print the time of the program has run](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibXifkhBlL70QuHiwcbBO7vQrR9qGvNgBH-sFMEahgL6fSswJrjGedAIU5OUfIqRthtCv8ErRJamMQobYZecLG5IgyvLguRoB1AmrYG1-d0HJTJ6sQuoSywdKCDBLyhyphenhyphenC3ICStVJJKEBQ/s400/Processing_printmillis.png) |
Print the time of the program has run, in millisecond. |
No comments:
Post a Comment