Processing has the following inbuilt time functions:
This returns the milliseconds that have passed since the sketch started. Recall that 1000 milliseconds = 1 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
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.
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.