In my app i want it right from the milisecond it starts running to the millisecond it stops i want it to do something. How can this be acheived ?