Advertisement
SharkyEXE

Untitled

Nov 2nd, 2018
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. def NTPStart(self):
  2. if config.plugins.SetClock.choiceSystemTime.value == "1":
  3. if not config.plugins.SetClock.useNTPminutes.value == "0":
  4. cmd = '/usr/lib/enigma2/python/Plugins/Extensions/SetClock/ntpdate -s -u %s' % config.plugins.SetClock.ip.value
  5. self.Console.ePopen(cmd, self.update_schedule)
  6. self.timer.startLongTimer(int(config.plugins.SetClock.useNTPminutes.value) * 60)
  7.  
  8. def update_schedule(self, result = None, retval = None, extra_args = None):
  9. if eDVBLocalTimeHandler.getInstance().ready():
  10. nowTime = time()
  11. if nowTime > 1388534400:
  12. setRTCtime(nowTime)
  13. if config.plugins.SetClock.choiceSystemTime.value == "0":
  14. eDVBLocalTimeHandler.getInstance().setUseDVBTime(True)
  15. else:
  16. eDVBLocalTimeHandler.getInstance().setUseDVBTime(False)
  17. try:
  18. eEPGCache.getInstance().timeUpdated()
  19. except:
  20. pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement