/src/serenity/Userland/Libraries/LibWeb/HTML/NavigatorConcurrentHardware.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org> |
3 | | * Copyright (c) 2024, Shannon Booth <shannon@serenityos.org> |
4 | | * |
5 | | * SPDX-License-Identifier: BSD-2-Clause |
6 | | */ |
7 | | |
8 | | #pragma once |
9 | | |
10 | | #include <LibCore/System.h> |
11 | | #include <LibWeb/WebIDL/Types.h> |
12 | | |
13 | | namespace Web::HTML { |
14 | | |
15 | | class NavigatorConcurrentHardwareMixin { |
16 | | public: |
17 | | // https://html.spec.whatwg.org/multipage/workers.html#dom-navigator-hardwareconcurrency |
18 | 0 | static WebIDL::UnsignedLongLong hardware_concurrency() { return Core::System::hardware_concurrency(); } |
19 | | }; |
20 | | |
21 | | } |