function setup() {
createCanvas(500, 500);
}
function draw() {
let y=year();
text('当前时间-year:'+y, 10, 10);
let mon=month();
text('当前时间-month:'+mon, 10, 25);
let d=day();
text('当前时间-day:'+d, 10, 40);
let h=hour();
text('当前时间-hour:'+h, 10, 55);
let m=minute();
text('当前时间-minute:'+m, 10, 70);
let sec=second();
text('当前时间-second:'+sec, 10, 85);
let millisecond=millis();
text('当前时间-millisecond:'+millisecond, 10, 100);
}