aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-31 11:29:02 +0100
committerSven Göthel <[email protected]>2024-01-31 11:29:02 +0100
commite933eb4cdf939a0b2284bf36e084959ffd4f04b2 (patch)
tree16c7c46d63d3cfbe4c3907831161432e4ca2c423 /src/java
parentdccb9a85e39cf82bd32ef28cb0202e2d486328ec (diff)
PTS: Add convenient getCurrent() passing Clock.currentMillis() to get(long).
Diffstat (limited to 'src/java')
-rw-r--r--src/java/com/jogamp/common/av/PTS.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/av/PTS.java b/src/java/com/jogamp/common/av/PTS.java
index 7d6d4fd..0b8a550 100644
--- a/src/java/com/jogamp/common/av/PTS.java
+++ b/src/java/com/jogamp/common/av/PTS.java
@@ -135,6 +135,8 @@ public final class PTS {
public int get(final long currentMillis) {
return pts + (int) ( ( currentMillis - scr ) * speed.get() + 0.5f );
}
+ /** Returns {@link #get(long)} passing {@link Clock#currentMillis()}. */
+ public int getCurrent() { return get( Clock.currentMillis() ); }
/** Returns {@link #get(long)} as time string representation via {@link #millisToTimeStr(long, boolean)}. */
public String getTimeStr(final long currentMillis, final boolean addFractions) {