summaryrefslogtreecommitdiffstats
path: root/algorithms.py
diff options
context:
space:
mode:
Diffstat (limited to 'algorithms.py')
-rw-r--r--algorithms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/algorithms.py b/algorithms.py
index d0988ee..78aac94 100644
--- a/algorithms.py
+++ b/algorithms.py
@@ -31,7 +31,7 @@ def get_closest_node_id(nodes, source_node):
min_node = node_id
min_value = length
- print(f"Found the closest node in {time.monotonic() - start} s")
+ print(f"Found the closest node in {time.monotonic() - start:.3} s")
return min_node
@@ -51,7 +51,7 @@ def find_shortest_path(nodes, source_id, target_id):
walk_end = walk[-1]
if walk_end == target_id:
# you have reached your destination
- print(f"Found a path in {time.monotonic() - start} s")
+ print(f"Found a path in {time.monotonic() - start:.3} s")
return walk
if walk_end in visited:
# there exists a shorter walk to walk_end