Timer interupt on ESP32

Hello! I would like to achieve this on ESP32. It is working fine on Arduino but when I am trying to compile the code for ESP I get the error.
Error message:
identifier "TIMER1_OVF_vect" is undefined
identifier "TIMSK1" is undefined

TIMSK1 |= (1 << TOIE1);

ISR(TIMER1_OVF_vect) {
//code
}

Is there any solution to use this on ESP32?

Those variables only exist on AVR cores, Google ESP32 Timer Interrupt and you will find lots of information on how to do it for the ESP32. It is quite different.