Skip to content

Commit 02e1c2b

Browse files
author
Lily
committed
totally forgor
1 parent 55bd612 commit 02e1c2b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

source/CoolUtil.hx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import utils.CoolSystemStuff;
2525

2626
using StringTools;
2727

28+
#if cpp
29+
@:cppFileCode('#include <thread>')
30+
#end
2831
class CoolUtil
2932
{
3033
public static var defaultDifficulties:Array<String> = [
@@ -552,4 +555,14 @@ class CoolUtil
552555
lime.app.Application.current.window.alert(message, title);
553556
#end
554557
}
558+
559+
#if cpp
560+
@:functionCode('
561+
return std::thread::hardware_concurrency();
562+
')
563+
#end
564+
public static function getCPUThreadsCount():Int
565+
{
566+
return 1;
567+
}
555568
}

0 commit comments

Comments
 (0)