public static long diffTimestamps ( final int a , final int b ) { // first convert each to unsigned integers final long unsignedA = a & 0xFFFFFFFF L ; final long unsignedB = b & 0xFFFFFFFF L ; // then find the delta final long delta = unsignedA - unsignedB ; return delta ; }
Calculates the delta between two time stamps adjusting for time stamp wrapping .