Thanks Admin & khalil.
i update the script so i have now a time like '00:05' and i also use the last time actived, what Khalil added.
My updated Resident script, thanks for both of you, without i could't make it.
Yes and i also can use now more timers of this.
i update the script so i have now a time like '00:05' and i also use the last time actived, what Khalil added.
My updated Resident script, thanks for both of you, without i could't make it.
Code:
ontime_Laptop_Table = 'ontime_Laptop_Table'
output_Laptop_Table = '32/1/201' --'Laptop tafel [timer on]'
time = storage.get(ontime_Laptop_Table)
if time then
delta = os.time() - time
minutes = math.floor(delta / 60)
hours = math.floor(minutes / 60)
minutes = minutes % 60
minutes = string.format("%02d", minutes)
if hours > 0 then
res = hours -- .. ': '
else
res = '00:'
end
hours = string.format("%02d", hours)
time_online = hours ..':'..minutes
grp.update(output_Laptop_Table, time_online)
end
Yes and i also can use now more timers of this.