Skip to content

Commit 38a72f8

Browse files
authored
Merge pull request #104 from jrmaddison/jrmaddison/time
Switch from time.time to time.perf_counter
2 parents d64c7d6 + 4cac36b commit 38a72f8

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

fenics_ice/solver.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ def sliding_law(self, alpha, U):
505505
def solve_mom_eq(self, annotate_flag=None):
506506
"""Solve the momentum equation defined in def_mom_eq"""
507507

508-
t0 = time.time()
508+
t0 = time.perf_counter()
509509

510510
newton_params = self.params.momsolve.newton_params
511511
picard_params = self.params.momsolve.picard_params
@@ -520,7 +520,7 @@ def solve_mom_eq(self, annotate_flag=None):
520520

521521
momsolver.solve(annotate=annotate_flag)
522522

523-
t1 = time.time()
523+
t1 = time.perf_counter()
524524
info("Time for solve: {0}".format(t1-t0))
525525

526526
def def_thickadv_eq(self):

runs/run_forward.py

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
mpl.use("Agg")
3535
import matplotlib.pyplot as plt
3636
import numpy as np
37-
import time
3837
import datetime
3938

4039

runs/run_inv.py

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
# mpl.use("Agg")
3333
# import matplotlib.pyplot as plt
3434
# import numpy as np
35-
# import time
3635
# import pickle
3736
import datetime
3837

0 commit comments

Comments
 (0)