ok this time for sure

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2016-09-28 23:30:07 +03:00
parent c477498102
commit c1ffc8cb6c
7 changed files with 42 additions and 59 deletions

View File

@@ -1,15 +1,12 @@
# vim: ft=ruby
class ModDate < ModBasic
@@mod_name = 'date'
def data_loop()
class ModDate < Worker
def mainloop()
while true do
$panel_data[@@mod_name.to_sym] = Time.now.strftime($config['mod']['date']['format'])
$queue << 1
self.write Time.now.strftime(@config['mod']['date']['format'])
sleep(1)
end
end
end
ModDate.new.mainloop()
Modules.add("date", "ModDate")