millis()#

Returns the number of milliseconds (thousandths of a second) since starting the program.

Examples#

def draw():
    m = py5.millis()
    py5.no_stroke()
    py5.fill(m%255)
    py5.rect(25, 25, 50, 50)

Description#

Returns the number of milliseconds (thousandths of a second) since starting the program. This information is often used for timing events and animation sequences.

Underlying Processing method: millis

Signatures#

millis() -> int

Updated on March 06, 2023 02:49:26am UTC