[iOS] Keyups for non-modifier keys identified as "Dead" when not focused in a content...
[WebKit-https.git] / Source / WebCore / platform / ios / SystemMemoryIOS.cpp
index d888cd2..ee8b969 100644 (file)
 #include "config.h"
 #include "SystemMemory.h"
 
+#if PLATFORM(IOS_FAMILY)
+
 #include <sys/sysctl.h>
 #include <wtf/Assertions.h>
-#include <wtf/CurrentTime.h>
+#include <wtf/WallTime.h>
 
 namespace WebCore {
 
 int systemMemoryLevel()
 {
-#if PLATFORM(IOS_SIMULATOR)
+#if PLATFORM(IOS_FAMILY_SIMULATOR)
     return 35;
 #else
     static int memoryFreeLevel = -1;
-    static double previousCheckTime; 
-    double time = currentTime();
-    if (time - previousCheckTime < 0.1)
+    static WallTime previousCheckTime;
+    WallTime time = WallTime::now();
+    if (time - previousCheckTime < 100_ms)
         return memoryFreeLevel;
     previousCheckTime = time;
     size_t size = sizeof(memoryFreeLevel);
@@ -53,3 +55,5 @@ int systemMemoryLevel()
 }
 
 } // namespace WebCore
+
+#endif // PLATFORM(IOS_FAMILY)