Time Functions

Processing has the following inbuilt time functions:

millis();

This returns the milliseconds that have passed since the sketch started. Recall that 1000 milliseconds = 1 second.

second();

This returns the seconds of the time on your computer clock. Eg if it is 20 seconds past the minute, seconds will return the value 20. It therefore varies from 0-59

minute();

This returns the minutes of the time on your computer clock. Eg if it is 20 minutes past the minute, minutes will return the value 20. It therefore varies from 0-59.

hour();

This returns the hour of the time on your computer clock. Eg if it is 3pm , hour will return the value 15. It therefore varies from 1-23.

Take a look at the documentation for day, month, year.