A person is an onein while taking care of arrangements for a burial, and, from what I have learned, if that person's work is finished and that person leaves the body or the body leaves the person for the last time, the status of Aveilut begins (even when the body has not been buried).
However, what if that Aveilut began and then the person was needed for a problem that arose unexpectedly. Does the person, now saddled with a new and unexpected preoccupying concern, resume status as an onein and what impact would this have on the computation of the days of shiva?