Change to custom timer implementation to increase performance