in reply to Re^2: Perl -de1 weirdness.
in thread Perl -de1 weirdness.
BTW, I get the lower-resolution results even w/o the debugger (but I've got 5.6.0 here).
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Perl -de1 weirdness.
by BrowserUk (Patriarch) on Jul 19, 2004 at 22:01 UTC | |
Yes. I've got 5.6.1 that still has the version 1.43 of Time::HiRes that shipped with it, and that uses GetSystemTimeasFiletime() which is the normal 1/64 (1/18) of a second resolution. The GetPerformanceCounter() code came in at 1.53 and was tweaked again in 1.59. I think I found the code that causes it in Time/HiRes.xs:
The comment suggests that this is to sync the performance timer numbers to the System Clock times, and I think this bit
is meant to ensure that the first part of the if/else is only entered once as MY_CXT.run_count isn't referenced any where else other than it's declaration. Basically an unsigned long 'first-time-only' flag. That suggests that somehow running under the auspices of the debugger is causing that C struct flag field to be reset. Quite how or why that could or would happen there and not in normal code is beyond my understanding of how the internals work. Not that that is saying much as I (re)-discovered recently, but t'is most perplexing. I guess it's time to turn it over to the internals guys? | [reply] [d/l] [select] |