Skip to content

Commit

Permalink
Timeout changed to perf_counter
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Hannie committed Mar 31, 2020
1 parent 065e6c9 commit 4577ea6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions minorminer/layout/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def find_embedding(
Output is dependent upon kwargs passed to minonminer, but more or less emb is a mapping from vertices of
S (keys) to chains in T (values).
"""
start = time.process_time()
start = time.perf_counter()

# Parse kwargs
layout_kwargs, placement_kwargs = _parse_kwargs(kwargs)
Expand All @@ -64,7 +64,7 @@ def find_embedding(
S_T_placement = Placement(
S_layout, T_layout, placement, **placement_kwargs)

end = time.process_time()
end = time.perf_counter()
timeout = kwargs.get("timeout")
if timeout is not None:
time_remaining = timeout - (end - start)
Expand Down

0 comments on commit 4577ea6

Please sign in to comment.