AC dimmer Timer Interupt

Hi,
i have edited the code.It has only one loop.
I the photon is running on 0.4.7 firmware and i am using the web IDE.
I guess the timer callback is not working.
Is there any issue with the code?