Timer interrupt works but sampling is irregular