1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| 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);
}
|