-- 实时更新当前时间的有背景的程序
-- 先搞出背景
backGroundImage = Image.load("background.PNG")
red = Color.new(255, 0, 0)
-- 再搞出时间, 打印出来
while true doyear = os.date("%Y ")
month = os.date("%B ")
datee = os.date("%d ")
day = os.date("%A")
hour = os.date("%H ")
minute = os.date("%M ")
second = os.date("%S ")
timeOn = year .. month .. datee .. day .. hour .. minute .. second
screen:clear()
screen:blit(0, 0, backGroundImage, 0, 0, backGroundImage:width(), backGroundImage:height(), false)
screen:print(5, 10, timeOn, red)
screen.waitVblankStart()
screen.flip()
end