Commit fa3a74e3 authored by carlosribas's avatar carlosribas
Browse files

time.clock() is deprecated

parent 3a36df07
......@@ -23,11 +23,11 @@ from rest_framework.test import APITestCase, APIClient
class Timer(object):
"""Helper class for detecting long-running requests."""
def __enter__(self):
self.start = time.clock()
self.start = time.perf_counter()
return self
def __exit__(self, *args):
self.end = time.clock()
self.end = time.perf_counter()
self.timeout = self.end - self.start
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment