Skip to content

Commit 0394fd4

Browse files
author
Jez Humble
committed
Added API call to find out if we're running on a supported platform
1 parent 303f3e3 commit 0394fd4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/com/jezhumble/javasysmon/JavaSysMon.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ public static void main (String[] params) throws Exception {
100100
}
101101
}
102102

103+
/**
104+
* Whether or not JavaSysMon is running on a supported platform.
105+
*
106+
* @return <code>true</code> if the platform is supported,
107+
* <code>false</code> if it isn't.
108+
*/
109+
public boolean supportedPlatform() {
110+
return !(monitor instanceof NullMonitor);
111+
}
112+
103113
private static String secsInDaysAndHours(long seconds) {
104114
long days = seconds / (60 * 60 * 24);
105115
long hours = (seconds / (60 * 60)) - (days * 24);

0 commit comments

Comments
 (0)