Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
fixes #18; improved Check code;
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyacheslav Stepanov committed Aug 1, 2016
1 parent 7df8227 commit 27309cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bubuku/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ class Check(object):
__last_check_timestamp_s = 0

def check_if_time(self) -> Change:
current_time_s = time()
if current_time_s - self.__last_check_timestamp_s >= self.check_interval_s:
self.__last_check_timestamp_s = current_time_s
if self.time_till_check() <= 0:
self.__last_check_timestamp_s = time()
return self.check()
return None

Expand Down

0 comments on commit 27309cb

Please sign in to comment.