problem with Inductive proximity sensor to measure rpm

how can i use proximity sensor to get rpm?

i have try to use attachinterrupt function and Micros but it stuck, There's no result

Any advice for the code or any function i'had miss?

Thanks