Skip to content

Commit

Permalink
修改超时时间
Browse files Browse the repository at this point in the history
  • Loading branch information
mailgyc committed Mar 2, 2020
1 parent 5e2b107 commit f1fddc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doudizhu/apps/game/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self, callback: Callable, timeout: int = 20):

@property
def timeout(self) -> int:
return max(int(time.time() - self._last_time), self._timeout)
return max(self._timeout - int(time.time() - self._last_time), 0)

def start_timing(self, timeout: int = 20):
if timeout:
Expand Down

0 comments on commit f1fddc6

Please sign in to comment.