Skip to content

Commit

Permalink
Added API call to find out if we're running on a supported platform
Browse files Browse the repository at this point in the history
  • Loading branch information
Jez Humble committed Jun 25, 2010
1 parent 303f3e3 commit 0394fd4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/com/jezhumble/javasysmon/JavaSysMon.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ public static void main (String[] params) throws Exception {
}
}

/**
* Whether or not JavaSysMon is running on a supported platform.
*
* @return <code>true</code> if the platform is supported,
* <code>false</code> if it isn't.
*/
public boolean supportedPlatform() {
return !(monitor instanceof NullMonitor);
}

private static String secsInDaysAndHours(long seconds) {
long days = seconds / (60 * 60 * 24);
long hours = (seconds / (60 * 60)) - (days * 24);
Expand Down

0 comments on commit 0394fd4

Please sign in to comment.