How can I get the duration of an operation??

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Post Reply
Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

How can I get the duration of an operation??

Post by Alberto_82 » Wed Oct 22, 2008 1:03 pm

Hi to everybody,
I need to calculate the execution time of some instructions, but I can\'t find a simple way to obtain it. Isn\'t there any function like \"get_time\" or something like that??

Thanks in advance,
/Alberto

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

Re:How can I get the duration of an operation??

Post by paolo.gai » Thu Oct 23, 2008 8:09 am

Depends on the architecture... are you referring to the FLEX boards?

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:How can I get the duration of an operation??

Post by Alberto_82 » Thu Oct 23, 2008 8:28 am

Yes, on the Flex board..
But I solved the problem using TMR1 register... All worked fine!

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

Re:How can I get the duration of an operation??

Post by paolo.gai » Thu Oct 23, 2008 8:34 am

Ok... fine!

Just take a look in ee/pkg/mcu/microchip_dspic/inc/ee_mcu.h

there are a few functions already made to read the timer.

Ciao,

PJ

Alberto_82
Newbie
Posts: 30
Joined: Wed Sep 03, 2008 2:15 pm

Re:How can I get the duration of an operation??

Post by Alberto_82 » Thu Oct 23, 2008 8:55 am

Thank you, now I read the code...

Alberto

Post Reply