Sorry for the confusion. When I said "Now inside this function", I was referring to the function I had pasted just above it. The line I am referring to is: cros_time_t x = n - m;
Yes, the serial prints are within the interrupts. I know they are not supposed to be used but I only used them briefly to debug, and removed them afterwards.