How long is task changing

I’m sorry about my language. I’m Thai and my English is really bad. I try to port FreeRTOS with LPC2148.
And then I create 2 tasks.
The first task set P1.22 and another clear P1.22.
But I want to know how’s long when 1st task change to 2rd task. Help me please.
Thank you for everybody. 
: )

How long is task changing

Are you yielding after setting the p1.22 pin and trying to measure how long it takes to get from one task to another? The time to change tasks is normally called the context switch time is will vary depending on the processor, crystal, compiler and features included in the build.

How long is task changing

Thank you.
I’ll follow your suggestion.
I want to know something about FreeRTOS.
Does it have any flag to show that the task is running?
Thank you again.

How long is task changing

pxCurrentTCB always points to the running task.