diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index 0f73c32b..bafd18a2 100644 --- a/mythril/laser/ethereum/svm.py +++ b/mythril/laser/ethereum/svm.py @@ -181,6 +181,7 @@ class LaserEVM: initial_coverage = self._get_covered_instructions() self.time = datetime.now() + time_handler.reset_start_time() log.info( "Starting message call transaction, iteration: {}, {} initial states".format( i, len(self.open_states) diff --git a/mythril/laser/ethereum/time_handler.py b/mythril/laser/ethereum/time_handler.py index 6ba1587c..12027a48 100644 --- a/mythril/laser/ethereum/time_handler.py +++ b/mythril/laser/ethereum/time_handler.py @@ -7,6 +7,9 @@ class TimeHandler(object, metaclass=Singleton): self._start_time = None self._transaction_execution_timeout = None + def reset_start_time(self): + self._start_time = int(time.time() * 1000) + def start_execution(self, execution_time: int, transaction_count: int): self._start_time = int(time.time() * 1000) self._transaction_execution_timeout = execution_time * 1000 // transaction_count