@Test public void timestampDelta() { timestamp_delta td = new timestamp_delta(); td.first = 100; td.delta = new int[]{100, 150}; long ts[] = FromXdr.timestamp_delta(td); assertArrayEquals(new long[]{100, 200, 350}, ts); }
public static long[] timestamp_delta(timestamp_delta tsd) { long[] result = new long[tsd.delta.length + 1]; long begin = result[0] = tsd.first; for (int i = 0; i < tsd.delta.length; ++i) { begin += tsd.delta[i]; result[i + 1] = begin; } return result; }
FromXdr { public static long[] timestamp_delta(timestamp_delta tsd) { long[] result = new long[tsd.delta.length + 1]; long begin = result[0] = tsd.first; for (int i = 0; i < tsd.delta.length; ++i) { begin += tsd.delta[i]; result[i + 1] = begin; } return result; } }
FromXdr { public static long[] timestamp_delta(timestamp_delta tsd) { long[] result = new long[tsd.delta.length + 1]; long begin = result[0] = tsd.first; for (int i = 0; i < tsd.delta.length; ++i) { begin += tsd.delta[i]; result[i + 1] = begin; } return result; }  }
FromXdr { public static long[] timestamp_delta(timestamp_delta tsd) { long[] result = new long[tsd.delta.length + 1]; long begin = result[0] = tsd.first; for (int i = 0; i < tsd.delta.length; ++i) { begin += tsd.delta[i]; result[i + 1] = begin; } return result; }  static DateTime timestamp(timestamp_msec ts); static FilePos filePos(file_segment fs); static MetricValue metricValue(metric_value mv, IntFunction<String> strGet); static Histogram histogram(histogram h); static long[] timestamp_delta(timestamp_delta tsd); static boolean[] bitset(bitset b); }
FromXdr { public static long[] timestamp_delta(timestamp_delta tsd) { long[] result = new long[tsd.delta.length + 1]; long begin = result[0] = tsd.first; for (int i = 0; i < tsd.delta.length; ++i) { begin += tsd.delta[i]; result[i + 1] = begin; } return result; }  static DateTime timestamp(timestamp_msec ts); static FilePos filePos(file_segment fs); static MetricValue metricValue(metric_value mv, IntFunction<String> strGet); static Histogram histogram(histogram h); static long[] timestamp_delta(timestamp_delta tsd); static boolean[] bitset(bitset b);  }