Getting system time

0 views
Skip to first unread message

Michael Yu

unread,
Mar 28, 2017, 4:24:20 PM3/28/17
to Numba Public Discussion - Public
Is there a way to get the system time in nopython=True mode? I'm looking for something like Python's time.time() function. I have a function that recursively calls itself, and I'd like to profile the time between every recursive call.

Thanks!
Michael

Joshua Adelman

unread,
Mar 28, 2017, 4:31:02 PM3/28/17
to Numba Public Discussion - Public
I don't think there is anything available directly (the devs can correct me if I'm wrong). Your best bet may be to use cffi to wrap a call to some external c code:

and then call the appropriate function from time.h, parse it and return it to the python side. This approach may be non-trivial depending on your comfort with C. 

Josh
Reply all
Reply to author
Forward
0 new messages