Skip to content

Commit

Permalink
src/sage/doctest/util.py: avoid dependency on sage.misc.timing.walltime
Browse files Browse the repository at this point in the history
The "walltime" function in sage.misc.timing is a silly wrapper around
time.time() in the python standard library. The code is a lot more
clear if we just use the latter.
  • Loading branch information
orlitzky committed Oct 16, 2024
1 parent 0c58518 commit db01308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sage/doctest/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.misc.timing import walltime
from time import time as walltime
from os import sysconf, times

def count_noun(number, noun, plural=None, pad_number=False, pad_noun=False):
Expand Down Expand Up @@ -345,7 +345,7 @@ def stop(self):
"""
from sage.interfaces.quit import expect_objects
self.cputime = self._quick_cputime(expect_objects) - self.cputime
self.walltime = walltime(self.walltime)
self.walltime = walltime() - self.walltime
return self

def annotate(self, object):
Expand Down

0 comments on commit db01308

Please sign in to comment.