Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api.py #427

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions freezegun/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def start(self):

if real_clock is not None:
# time.clock is deprecated and was removed in Python 3.8
time.clock = fake_clock
time.perf_counter = fake_clock
to_patch.append(('real_clock', real_clock, fake_clock))

self.fake_names = tuple(fake.__name__ for real_name, real, fake in to_patch)
Expand Down Expand Up @@ -756,7 +756,7 @@ def stop(self):
time.gmtime = real_gmtime
time.localtime = real_localtime
time.strftime = real_strftime
time.clock = real_clock
time.perf_counter = real_clock

if _TIME_NS_PRESENT:
time.time_ns = real_time_ns
Expand Down