Use binary search for time machine logic