Fix mac

fix the build on mac with apple-provided clang

also adds a test for the timer.