WIP: new timing loops

This PR is still missing some documentation, but the new timing loops are already useable.

I found some surprising/interesting results when testing the new timing loops. I'm currently analyzing the results, I'll post my notes here when I'm done.

cc @kmcallister