Commit a17d455f authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

missing file

parent 6be42473
Pipeline #8684 failed with stages
in 1 minute and 15 seconds
import time
import atexit
import gmsh
import signal
gmsh.initialize()
gmsh.option.setNumber("General.Terminal",1)
signal.signal(signal.SIGINT, signal.SIG_DFL)
timers = {}
def timeit(func):
def wrapper(*args, **kwargs):
self = args[0]
tic = time.process_time()
r = func(*args, **kwargs)
toc = time.process_time()
name = func.__name__
timers[name] = timers.get(name, 0) + toc - tic
return r
return wrapper
atexit.register(print, timers)
Supports Markdown
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