Subject: | clock() method fails on win32 |
Perl 5.8.0
Sys-CPU 0.35
Windows 2000 Pro
The clock() method always returns 0. The registry entry under ~MHz is a hex string, not an integer, so the atoi() call will always return 0.
Also, some warnings that may be of interest:
CPU.c(150) : warning C4101: 'RETVAL' : unreferenced local variable
CPU.c(175) : warning C4101: 'RETVAL' : unreferenced local variable
CPU.c(222) : warning C4101: 'RETVAL' : unreferenced local variable
C:\Perl\src\Sys-CPU-0.35>nmake test
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.
C:\Perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..4
ok 1
ok 2 (CPU Count : 1)
not ok 3 (cpu_clock undefined (ok if Win9x)) # bogus
ok 4 (CPU Type : x86 Family 6 Model 10 Stepping 0)
Strangely, when I try to use strtol or strtoul it still comes back 0.
Regards,
Dan