diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py index e4541fbe018..84f4e383f91 100644 --- a/Lib/test/test_email/test_email.py +++ b/Lib/test/test_email/test_email.py @@ -3164,7 +3164,10 @@ Foo self.msgids = [] append = self.msgids.append make_msgid = utils.make_msgid - clock = time.clock + try: + clock = time.monotonic + except AttributeError: + clock = time.time tfin = clock() + 3.0 while clock() < tfin: append(make_msgid(domain='testdomain-string'))