How to convert the observed Timestamped<T> sequence to the TimeInterval<T> sequence, where the interval is the time between the timestamps in the original sequence?
Given the input sequence.
new Timestamped<int>(1, DateTime.Parse("2000-01-01 00:00:01")) new Timestamped<int>(2, DateTime.Parse("2000-01-01 00:00:05")) new Timestamped<int>(3, DateTime.Parse("2000-01-01 00:01:04"))
.. the output will be:
new TimeInterval<int>(1, TimeSpan.Parse("00:00:00")) new TimeInterval<int>(2, TimeSpan.Parse("00:00:04")) new TimeInterval<int>(3, TimeSpan.Parse("00:00:59"))
source share