TIMSK1 is the Timer 1 interrupt mask register. In order to replicate the timer function, I would use https://github.com/ivanseidel/DueTimer. Basically you need use a timer interrupt, and start, stop and set period functions.
TMROVF_INT_OFF => stop the timer
TMROVF_INT_ON => start the timer
TCNT1 = TMR_PRELOAD => set the timer period