View difference between Paste ID: aXip4rXb and TbaE9GtT
SHOW: | | - or go back to the newest paste.
1
while true do
2
    local monitor = peripheral.wrap("top")
3
    monitor.setTextScale(1)
4
    local maxW, maxH = term.getSize()
5
    local nyear = 0
6
    term.clear()
7
    term.setCursorPos(1,1)
8
    local nTime = os.time()
9
    local time_nospace_zero = string.gsub(textutils.formatTime(os.time(), false), " ", " ")  
10
    local time_nospace_10error = string.gsub(time_nospace_zero, "0:", "12:")
11
    nTime = string.gsub(time_nospace_10error, "112:", "10:")
12
    local nDay = os.day()
13
    local ognday = nDay
14
    while nDay > 365 do
15
        nDay = nDay - 365
16
        nyear = nyear + 1
17
    end
18
    term.setCursorPos(1, maxH)
19
    if ognday < 10000 then
20
        print("(" .. "Total Days: "..ognday.. ")")
21
    elseif ognday > 9999 then
22
        print("(" .. "TotalDays: "..ognday.. ")")
23
    elseif ognday > 99999 then
24
        print("(" .. "TotalDays:"..ognday.. ")")
25
    elseif ognday > 999999 then
26
        print("(" .. "TtlDs:"..ognday.. ")")
27
    end
28
    term.scroll(-1)
29
    term.setCursorPos(1,1)
30
    print(nTime)
31
    term.setCursorPos(1,2)
32
    print("Day " .. nDay)
33
    term.setCursorPos(1,3)
34
    print("Year " .. nyear)
35
36-
    sleep(0.833333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333328)
36+
    sleep(0.8333333333333333333333333333333333333333333333333333333333333333328)
37
    end