Changed timer to use custom Timer instead of NanoTimer