Browse Source

New translations timer.py (French)

l10n_v0.2.x
linlin 4 years ago
parent
commit
3ad7b6b727
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      lang/fr/gklearn/utils/timer.py

+ 5
- 5
lang/fr/gklearn/utils/timer.py View File

@@ -23,8 +23,8 @@ class Timer(object):
time_limit_in_sec : string
The time limit in seconds.
"""
self.__time_limit_in_sec = time_limit_in_sec
self.__start_time = time.time()
self._time_limit_in_sec = time_limit_in_sec
self._start_time = time.time()
def expired(self):
@@ -34,7 +34,7 @@ class Timer(object):
------
Boolean true if the time limit has expired and false otherwise.
"""
if self.__time_limit_in_sec > 0:
runtime = time.time() - self.__start_time
return runtime >= self.__time_limit_in_sec
if self._time_limit_in_sec > 0:
runtime = time.time() - self._start_time
return runtime >= self._time_limit_in_sec
return False

Loading…
Cancel
Save