NavigatorConcurrentHardware.h 531 B

123456789101112131415161718192021
  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. #pragma once
  8. #include <LibCore/System.h>
  9. #include <LibWeb/WebIDL/Types.h>
  10. namespace Web::HTML {
  11. class NavigatorConcurrentHardwareMixin {
  12. public:
  13. // https://html.spec.whatwg.org/multipage/workers.html#dom-navigator-hardwareconcurrency
  14. static WebIDL::UnsignedLongLong hardware_concurrency() { return Core::System::hardware_concurrency(); }
  15. };
  16. }