Code Sketch


Digital Clock
By: Nitin Mishra
def clock() {
    val f = java.time.format.DateTimeFormatter.ofPattern("hh:mm:ss a")
    val currentTime = java.time.LocalTime.now().format(f)
    val pTime = Picture.text(
        currentTime,
        Font("Digital-7 Italic", 180)

    ).withTranslation(-360, 100)
    .withPenColor(cm.linearGradient(0, 0, cyan, 0, 100, pink, false))

    pTime.draw()
    pause(1)
    pTime.erase()
    clock()
}
cleari
setBackground(black)
clock