Skip to content

Commit 20db007

Browse files
committed
BridJ: added PlatformUtils with keyboard/mouse idle time API.
1 parent c2d82d7 commit 20db007

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

libraries/Runtime/BridJ/src/test/java/org/bridj/PlatformTest.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package org.bridj;
2-
2+
import org.bridj.platform.PlatformUtils;
33
import static org.bridj.Platform.*;
44
import org.junit.*;
55
import static org.junit.Assert.*;
@@ -10,7 +10,7 @@ public class PlatformTest {
1010
public void testSizes() {
1111
int clong = isWindows() || !is64Bits() ? 4 : 8;
1212
int sizet = is64Bits() ? 8 : 4, ptr = sizet;
13-
int wchar = 2;
13+
int wchar = isMacOSX() ? 4 : 2;
1414

1515
assertEquals(clong, Platform.CLONG_SIZE);
1616
assertEquals(sizet, Platform.SIZE_T_SIZE);
@@ -40,4 +40,10 @@ public void testMachine() throws Exception {
4040

4141
assertEquals(m, Platform.getMachine());
4242
}
43+
44+
@Test
45+
public void testIdleTime() {
46+
long time = PlatformUtils.getInstance().getIdleTimeMillis();
47+
//println("Idle time = " + time);
48+
}
4349
}

0 commit comments

Comments
 (0)