Beginner : Evaluating the time for a task

As @richard-damon already pointed, rather than attempting to calculate execution time (which can vary due to other high-priority tasks or interrupts), a more robust solution would be to implement explicit acknowledgment from the receiver once it completes message processing.