summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/num-cpus
blob: c5f28a15d5ffafa643f317eb53bcbea6386c5238 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl

use strict;
use warnings;

use Win32API::Registry 0.21 qw( :ALL );


my $key;
my $i = 0;
while (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\$i", 0, KEY_READ, $key)) {
    $i++;
    RegCloseKey($key);
}

print "$i\n";