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)26 void Logger::outputDebugString (const String& text)
27 {
28     std::cerr << text << std::endl;
29 }
30 
31 //==============================================================================
getOperatingSystemType()32 SystemStats::OperatingSystemType SystemStats::getOperatingSystemType()  { return WASM; }
getOperatingSystemName()33 String SystemStats::getOperatingSystemName()    { return "WASM"; }
isOperatingSystem64Bit()34 bool SystemStats::isOperatingSystem64Bit()      { return true; }
getDeviceDescription()35 String SystemStats::getDeviceDescription()      { return "Web-browser"; }
getDeviceManufacturer()36 String SystemStats::getDeviceManufacturer()     { return {}; }
getCpuVendor()37 String SystemStats::getCpuVendor()              { return {}; }
getCpuModel()38 String SystemStats::getCpuModel()               { return {}; }
getCpuSpeedInMegahertz()39 int SystemStats::getCpuSpeedInMegahertz()       { return 0; }
getMemorySizeInMegabytes()40 int SystemStats::getMemorySizeInMegabytes()     { return 0; }
getPageSize()41 int SystemStats::getPageSize()                  { return 0; }
getLogonName()42 String SystemStats::getLogonName()              { return {}; }
getFullUserName()43 String SystemStats::getFullUserName()           { return {}; }
getComputerName()44 String SystemStats::getComputerName()           { return {}; }
getUserLanguage()45 String SystemStats::getUserLanguage()           { return {}; }
getUserRegion()46 String SystemStats::getUserRegion()             { return {}; }
getDisplayLanguage()47 String SystemStats::getDisplayLanguage()        { return {}; }
48 
49 //==============================================================================
initialise()50 void CPUInformation::initialise() noexcept
51 {
52     numLogicalCPUs = 1;
53     numPhysicalCPUs = 1;
54 }
55 
56 //==============================================================================
juce_millisecondsSinceStartup()57 uint32 juce_millisecondsSinceStartup() noexcept
58 {
59     return static_cast<uint32> (emscripten_get_now());
60 }
61 
getHighResolutionTicks()62 int64 Time::getHighResolutionTicks() noexcept
63 {
64     return static_cast<int64> (emscripten_get_now() * 1000.0);
65 }
66 
getHighResolutionTicksPerSecond()67 int64 Time::getHighResolutionTicksPerSecond() noexcept
68 {
69     return 1000000;  // (microseconds)
70 }
71 
getMillisecondCounterHiRes()72 double Time::getMillisecondCounterHiRes() noexcept
73 {
74     return emscripten_get_now();
75 }
76 
setSystemTimeToThisTime() const77 bool Time::setSystemTimeToThisTime() const
78 {
79     return false;
80 }
81 
juce_isRunningUnderDebugger()82 JUCE_API bool JUCE_CALLTYPE juce_isRunningUnderDebugger() noexcept
83 {
84     return false;
85 }
86 
87 } // namespace juce
88