Add proper timer functions for benchmarking