I think I'vefound the problem ith bonarySearchOnTime().

A simple binary search instead of a range search would suffice