adds a rather barebones timing api and some tests