I have compiled it without problem, so i guess the simulator does not support interrupts. Aybe try with a simple program first to see if that's the case.
And for that conversion, try if just putting (int) or (long) in front of the calculation makes a difference. That converts to respectively an int and a long.