Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Getting time more exact than millisecond

onkelhotte
New Contributor II
405 Views
Hi there,
I want to examine my code, so I can see, which subroutine and function takes how much time to execute. It is written in CVF6.6 and VS 6.
I tried enabling profiling in the linker section of project settings, but the subroutines I need to watch arent listed there, when I Profile function timings.
So I want to check the times before and after the subroutine, but CPU_TIME only returns in milliseconds and that is too inaccurate, because I get 0 or 0.01 seconds each time.
Is there a more accurate function or are there any other built in test methods for seeing the run-time behavior?
Thanks in advance
Markus
0 Kudos
1 Reply
Steven_L_Intel1
Employee
405 Views
Look in the Win32 API documentation for "multimedia timers".

CPU_TIME and SYSTEM_CLOCK rely on the operating system updating timers, and the resolution of these is rather coarse, as you have found.
0 Kudos
Reply