repo.or.cz
/
webkit
/
qt.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git]
/
WebKitTools
/
Scripts
/
num-cpus
blob
c5f28a15d5ffafa643f317eb53bcbea6386c5238
1
#!/usr/bin/perl
2
3
use
strict
;
4
use
warnings
;
5
6
use
Win32API
::
Registry
0.21
qw( :ALL )
;
7
8
9
my
$key
;
10
my
$i
=
0
;
11
while
(
RegOpenKeyEx
(
HKEY_LOCAL_MACHINE
,
"HARDWARE
\\
DESCRIPTION
\\
System
\\
CentralProcessor
\\
$i
"
,
0
,
KEY_READ
,
$key
)) {
12
$i
++;
13
RegCloseKey
(
$key
);
14
}
15
16
print
"
$i
\n
"
;