Forum Discussion
h_hasenack
15 years agoOccasional Contributor
I have experimented a bit with EnableProfiling(Enabled:boolean) and with this it's also not possible to "skip" the elapsed time. It simply does not record subroutine calls, but still measures the elapsed time.
What about a routine like PauseProfileTimer(Paused:boolean). Would that be hard to implement? (Still I do not know how elapsed time actually is measured).
With this routine I could write a wrapper around WaitForSingleObject like this:
function MyWaitForSingleObject(hHandle: THandle; dwMilliseconds: DWORD): DWORD;
begin
PauseProfileTimer(True);
try
Result:=windows.WaitForSingleObject(hHandle,dwMilliseconds);
finally
PauseProfileTimer(False);
end;
end;
Regards - Hans
What about a routine like PauseProfileTimer(Paused:boolean). Would that be hard to implement? (Still I do not know how elapsed time actually is measured).
With this routine I could write a wrapper around WaitForSingleObject like this:
function MyWaitForSingleObject(hHandle: THandle; dwMilliseconds: DWORD): DWORD;
begin
PauseProfileTimer(True);
try
Result:=windows.WaitForSingleObject(hHandle,dwMilliseconds);
finally
PauseProfileTimer(False);
end;
end;
Regards - Hans
Related Content
Recent Discussions
- 4 months ago
- 2 years ago