1 /* 2 ============================================================================== 3 4 This file is part of the JUCE library. 5 Copyright (c) 2020 - Raw Material Software Limited 6 7 JUCE is an open source library subject to commercial or open-source 8 licensing. 9 10 The code included in this file is provided under the terms of the ISC license 11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission 12 To use, copy, modify, and/or distribute this software for any purpose with or 13 without fee is hereby granted provided that the above copyright notice and 14 this permission notice appear in all copies. 15 16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER 17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE 18 DISCLAIMED. 19 20 ============================================================================== 21 */ 22 23 namespace juce 24 { 25 outputDebugString(const String & text)26void Logger::outputDebugString (const String& text) 27 { 28 std::cerr << text << std::endl; 29 } 30 31 //============================================================================== getOperatingSystemType()32SystemStats::OperatingSystemType SystemStats::getOperatingSystemType() { return WASM; } getOperatingSystemName()33String SystemStats::getOperatingSystemName() { return "WASM"; } isOperatingSystem64Bit()34bool SystemStats::isOperatingSystem64Bit() { return true; } getDeviceDescription()35String SystemStats::getDeviceDescription() { return "Web-browser"; } getDeviceManufacturer()36String SystemStats::getDeviceManufacturer() { return {}; } getCpuVendor()37String SystemStats::getCpuVendor() { return {}; } getCpuModel()38String SystemStats::getCpuModel() { return {}; } getCpuSpeedInMegahertz()39int SystemStats::getCpuSpeedInMegahertz() { return 0; } getMemorySizeInMegabytes()40int SystemStats::getMemorySizeInMegabytes() { return 0; } getPageSize()41int SystemStats::getPageSize() { return 0; } getLogonName()42String SystemStats::getLogonName() { return {}; } getFullUserName()43String SystemStats::getFullUserName() { return {}; } getComputerName()44String SystemStats::getComputerName() { return {}; } getUserLanguage()45String SystemStats::getUserLanguage() { return {}; } getUserRegion()46String SystemStats::getUserRegion() { return {}; } getDisplayLanguage()47String SystemStats::getDisplayLanguage() { return {}; } 48 49 //============================================================================== initialise()50void CPUInformation::initialise() noexcept 51 { 52 numLogicalCPUs = 1; 53 numPhysicalCPUs = 1; 54 } 55 56 //============================================================================== juce_millisecondsSinceStartup()57uint32 juce_millisecondsSinceStartup() noexcept 58 { 59 return static_cast<uint32> (emscripten_get_now()); 60 } 61 getHighResolutionTicks()62int64 Time::getHighResolutionTicks() noexcept 63 { 64 return static_cast<int64> (emscripten_get_now() * 1000.0); 65 } 66 getHighResolutionTicksPerSecond()67int64 Time::getHighResolutionTicksPerSecond() noexcept 68 { 69 return 1000000; // (microseconds) 70 } 71 getMillisecondCounterHiRes()72double Time::getMillisecondCounterHiRes() noexcept 73 { 74 return emscripten_get_now(); 75 } 76 setSystemTimeToThisTime() const77bool Time::setSystemTimeToThisTime() const 78 { 79 return false; 80 } 81 juce_isRunningUnderDebugger()82JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() noexcept 83 { 84 return false; 85 } 86 87 } // namespace juce 88