diff options
Diffstat (limited to 'src/java/com/jogamp/common/os')
-rw-r--r-- | src/java/com/jogamp/common/os/Clock.java | 19 | ||||
-rw-r--r-- | src/java/com/jogamp/common/os/Platform.java | 18 |
2 files changed, 34 insertions, 3 deletions
diff --git a/src/java/com/jogamp/common/os/Clock.java b/src/java/com/jogamp/common/os/Clock.java index 9380442..8e9f99d 100644 --- a/src/java/com/jogamp/common/os/Clock.java +++ b/src/java/com/jogamp/common/os/Clock.java @@ -144,8 +144,23 @@ public class Clock { } /** - * Returns current monotonic time in milliseconds. - * + * Returns current monotonic milliseconds since start of this application. + * <p> + * Monotonic time shall be used for high-performance measurements of durations, + * since the underlying OS shall support fast calls. + * </p> + * @see #getMonotonicStartupTime() + * @see #currentNanos() + * @see #getMonotonicNanos() + */ + public static native long currentMillis(); + + /** + * Returns the unix based current monotonic time in milliseconds. + * <p> + * Monotonic time shall be used for high-performance measurements of durations, + * since the underlying OS shall support fast calls. + * </p> * @see #getMonotonicStartupTime() * @see #currentNanos() * @see #getMonotonicNanos() diff --git a/src/java/com/jogamp/common/os/Platform.java b/src/java/com/jogamp/common/os/Platform.java index ffea42c..206b7f8 100644 --- a/src/java/com/jogamp/common/os/Platform.java +++ b/src/java/com/jogamp/common/os/Platform.java @@ -521,7 +521,23 @@ public class Platform extends PlatformPropsImpl { // /** - * Returns the unix based current time in milliseconds, see {@link Clock#currentTimeMillis()}. + * Returns current monotonic milliseconds since start of this application. + * <p> + * Monotonic time shall be used for high-performance measurements of durations, + * since the underlying OS shall support fast calls. + * </p> + * @see Clock#currentMillis() + */ + public static long currentMillis() { + return Clock.currentMillis(); + } + + /** + * Returns the unix based current monotonic time in milliseconds. + * <p> + * Monotonic time shall be used for high-performance measurements of durations, + * since the underlying OS shall support fast calls. + * </p> * @see Clock#currentTimeMillis() */ public static long currentTimeMillis() { |