Simplify timer function to 20 samples