Skip to content

Commit

Permalink
Merge pull request #104 from jrmaddison/jrmaddison/time
Browse files Browse the repository at this point in the history
Switch from time.time to time.perf_counter
  • Loading branch information
bearecinos authored Sep 4, 2022
2 parents d64c7d6 + 4cac36b commit 38a72f8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions fenics_ice/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ def sliding_law(self, alpha, U):
def solve_mom_eq(self, annotate_flag=None):
"""Solve the momentum equation defined in def_mom_eq"""

t0 = time.time()
t0 = time.perf_counter()

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

momsolver.solve(annotate=annotate_flag)

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

def def_thickadv_eq(self):
Expand Down
1 change: 0 additions & 1 deletion runs/run_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
mpl.use("Agg")
import matplotlib.pyplot as plt
import numpy as np
import time
import datetime


Expand Down
1 change: 0 additions & 1 deletion runs/run_inv.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
# mpl.use("Agg")
# import matplotlib.pyplot as plt
# import numpy as np
# import time
# import pickle
import datetime

Expand Down

0 comments on commit 38a72f8

Please sign in to comment.