Updated timer test and fixed performance counter on Mac OS X