Is there a particular example for why you can't assume a timeseries is in sorted order?  For most of my timeseries applications that's one of the requirements I put on the datasource, particularly because it lessens the logic on my end, and a timeseries doesn't make much sense if it's in random order