Also, doesn't this need to be adjusted to the reverse sort order too? I.e. now you really have a iterator time which is larger than t.