update new timer code, add interval, fix timer0_freq