Hi Carlos,
Which Kinetis device are you using?
Are you using RTOS? If yes which?
If MQX please review this previous Community Post:
Re: elapsed time in nanoseconds
If baremetal then you could use a PIT timer to is derived from the Peripheral Bus Clock (1/2 the core clock) and start the timer are one breakpoint and stop it at the second breakpoint. Be careful the PIT has not overflown.
Regards,
David