Tim,

why don't you take advantage of Time::HiRes instead of your own dbi_time() 
implementation. If you are afraid of module dependency or you have another good reason 
for it could you accept the patch below. It will provide microsecond precision for 
DBI profiling on MSWin32 (at least my MS Visual C 6 doesn't implement gettimeofday() 
function but provides similar one).

12,15d11
< # if (defined(_WIN32) && (! defined(HAS_GETTIMEOFDAY)))
< #include <sys/timeb.h>
< # endif
<
1815,1819d1810
< # ifdef _WIN32
<     struct _timeb when;
<     _ftime( &when );
<     return when.time + (when.millitm / 1000.0);
< # else
1822d1812
< # endif

BTW: All tests successfully passes with this patch applied. But without it... 
(MSWin32, AS Perl 5.6.1.633)

t\40profile.........FAILED tests 22-25
        Failed 4/56 tests, 92.86% okay
t\41prof_dump.......ok
t\42prof_data.......FAILED test 6
        Failed 1/14 tests, 92.86% okay

-- Petr Smejkal

Reply via email to