This commit is contained in:
Julian Brammer 2024-06-07 18:06:23 +02:00
parent f4d437cff5
commit 1e70338535
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@ function clearDisplay()
term.setCursorPos(1,1) term.setCursorPos(1,1)
end end
function getCurrentTime()
local time = textutils.formatTime(os.time("local")+2, true)
return time
end
function writeToFile(file, content) function writeToFile(file, content)
file = fs.open(file, "w") file = fs.open(file, "w")
file.write(content) file.write(content)

View File

@ -48,7 +48,7 @@ function sendLog(to, targetPath, logMsg)
local payloadTable = {} local payloadTable = {}
payloadTable[0] = targetPath payloadTable[0] = targetPath
payloadTable[1] = logMsg payloadTable[1] = basic.getCurrentTime .. ": " .. logMsg
sendMessage(to, "log", payloadTable) sendMessage(to, "log", payloadTable)
end end