sharat87/ti — pull request #8 by abesto (2014-10-07 15:20:29+00:00)
Title: Fix: interrupts and the task they interrupt overlapped

Sorry, I realized that the original implementation of interrupts counts the time spent in an interrupt towards both the interrupt and the interrupted task. Worse yet, if you're N deep in interrupts, you're counting minutes towards N tasks :)

This implementation first stops the original task, then starts the interrupt. When the interrupt is done, it restarts the interrupted task. (Interrupted tasks are still on a stack, it works arbitrarily deep). It's also cleaner in reuses the already existing actions to make the logic easier to read.