Read the task\'s time

Forum related to the FLEX boards

Moderator: paolo.gai

Locked
Luigi_84
Newbie
Posts: 4
Joined: Mon Feb 23, 2009 5:17 pm

Read the task\'s time

Post by Luigi_84 » Mon Oct 12, 2009 8:57 am

Hi everybody i need to read the starting and the ending time of a task. How can i do? Is there any possible primitives?
Thank you.

paolo.gai
Administrator
Posts: 875
Joined: Thu Dec 07, 2006 12:11 pm

Re:Read the task\'s time

Post by paolo.gai » Mon Oct 12, 2009 1:34 pm

Hi,

You should just program a timer, and then read the timer at each pretaskhook and posttaskhook.

This should give you an idea of how long the program lasted, including all the preemption points.

Please note that PreTaskHook and PostTaskHook are only available in the OSEK conformance classes (BCC1, BCC2, ECC1, ECC2).

Ciao,

PJ

Locked