-
public class TimestampUtilsHelper class to perform various timestamp manipulations and comparisons
-
-
Field Summary
Fields Modifier and Type Field Description public final static longMAX_TIMESTAMP_VALUEpublic final static longROLLOVER_DELTA_VALUE
-
Method Summary
Modifier and Type Method Description static longsubtractAsUnsignedInt32(long t1, long t2)Calculate the subtraction result of two long input as unsigned 32bit int. static booleanisNewerTimestamp(long t1, long t2)Returns true if t1 is newer than t2,taking into account rollover. static longlatestTimestamp(long timestamp1, long timestamp2)webrtc/modules/include/module_common_types. -
-
Method Detail
-
subtractAsUnsignedInt32
static long subtractAsUnsignedInt32(long t1, long t2)
Calculate the subtraction result of two long input as unsigned 32bit int.
- Parameters:
t1- the first timestampt2- the second timestamp
-
isNewerTimestamp
static boolean isNewerTimestamp(long t1, long t2)
Returns true if t1 is newer than t2,taking into account rollover. This is done by effectivelychecking if the distance of going from 't2' to't1' (strictly incrementing) is shorter or if going from't1' to 't2' (i.e. rolling over) is shorter.webrtc/modules/include/module_common_types.h
-
latestTimestamp
static long latestTimestamp(long timestamp1, long timestamp2)
webrtc/modules/include/module_common_types.h
-
-
-
-