second()

Py5 communicates with the clock on your computer.

Examples

1
2
3
4
5
6
7
8
def draw():
    py5.background(204)
    s = py5.second()  # values from_ 0 - 59
    m = py5.minute()  # values from_ 0 - 59
    h = py5.hour()    # values from_ 0 - 23
    py5.line(s, 0, s, 33)
    py5.line(m, 33, m, 66)
    py5.line(h, 66, h, 100)

Description

Py5 communicates with the clock on your computer. The second() function returns the current second as a value from 0 - 59.

Underlying Java method: second

Syntax

second() -> int

Updated on September 11, 2021 16:51:34pm UTC