public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] minimum execution time with ecos
@ 2007-04-13 10:40 M Arshad Khan
  2007-04-13 14:38 ` [ECOS] " Grant Edwards
  2007-04-16  9:33 ` [ECOS] " Chris Zimman
  0 siblings, 2 replies; 4+ messages in thread
From: M Arshad Khan @ 2007-04-13 10:40 UTC (permalink / raw)
  To: ecos-discuss

hii
can any body tell me wht is the minimum time delay that we can achive with ecos.
i want to run a simulation on ecos that will run in less then a
tick(10mSec), is it possible and want to find its exact execution
time.. how to find that.
thanks
Arshad Khan

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS]  Re: minimum execution time with ecos
  2007-04-13 10:40 [ECOS] minimum execution time with ecos M Arshad Khan
@ 2007-04-13 14:38 ` Grant Edwards
  2007-04-13 14:50   ` Grant Edwards
  2007-04-16  9:33 ` [ECOS] " Chris Zimman
  1 sibling, 1 reply; 4+ messages in thread
From: Grant Edwards @ 2007-04-13 14:38 UTC (permalink / raw)
  To: ecos-discuss

On 2007-04-13, M Arshad Khan <marshadkhan@gmail.com> wrote:

> can any body tell me wht is the minimum time delay that we can
> achive with ecos.

If youw ant to actually put a thread to sleep, the minimum
delay is one clock tick.   Usually 1ms or 10ms.  If you want to
busy way, the minimum delay is platform-dependant -- usually
tens or hundreds of nanoseconds.

> i want to run a simulation on ecos that will run in less then
> a tick(10mSec), is it possible and want to find its exact
> execution time.. how to find that.

That's a completely different question.  The minimum delay has
nothing to do with the granularity with which you can measure
time.  There's a call you can make to return the
number of hardware timer counts since the last system timer tick.

See the kernel test tm_basic sources -- it does exactly what
you're trying to do.

-- 
Grant Edwards                   grante             Yow!  ... Um...Um...
                                  at               
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ECOS]  Re: minimum execution time with ecos
  2007-04-13 14:38 ` [ECOS] " Grant Edwards
@ 2007-04-13 14:50   ` Grant Edwards
  0 siblings, 0 replies; 4+ messages in thread
From: Grant Edwards @ 2007-04-13 14:50 UTC (permalink / raw)
  To: ecos-discuss

On 2007-04-13, Grant Edwards <grante@visi.com> wrote:
> On 2007-04-13, M Arshad Khan <marshadkhan@gmail.com> wrote:

>> i want to run a simulation on ecos that will run in less then
>> a tick(10mSec), is it possible and want to find its exact
>> execution time.. how to find that.
>
> That's a completely different question.  The minimum delay has
> nothing to do with the granularity with which you can measure
> time.  There's a call you can make to return the number of
> hardware timer counts since the last system timer tick.

I forgot to mention -- the granularity of that method is also
platform dependant, but it's also probably on the order of tens
or hundreds of nanoseconds.

Again, you should look at the tm_basic sources, they do exactly
what you're trying to do: measure the execution time of a
function.

-- 
Grant Edwards                   grante             Yow!  I brought my BOWLING
                                  at               BALL -- and some DRUGS!!
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] minimum execution time with ecos
  2007-04-13 10:40 [ECOS] minimum execution time with ecos M Arshad Khan
  2007-04-13 14:38 ` [ECOS] " Grant Edwards
@ 2007-04-16  9:33 ` Chris Zimman
  1 sibling, 0 replies; 4+ messages in thread
From: Chris Zimman @ 2007-04-16  9:33 UTC (permalink / raw)
  To: M Arshad Khan, ecos-discuss

Arshad,

I'm not entirely sure I understand what you're asking, but I'll take a
shot at it anyhow.

If you need higher precision time, use your target CPUs built in timers
as these typically provide much higher resolution.  If you want to
instrument routines to see their exact execution time, you can enable
profiling, or do something like:

my_func()
{
...
tstart = get_timer_val();
...
tend = get_timer_val()

elapsed = tend - tstart;

}

You may need to check for timer wraparound depending on what the timer
resolution is.
 
--Chris

-----Original Message-----
From: ecos-discuss-owner@ecos.sourceware.org
[mailto:ecos-discuss-owner@ecos.sourceware.org] On Behalf Of M Arshad
Khan
Sent: 13 April 2007 11:40
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] minimum execution time with ecos

hii
can any body tell me wht is the minimum time delay that we can achive
with ecos.
i want to run a simulation on ecos that will run in less then a
tick(10mSec), is it possible and want to find its exact execution
time.. how to find that.
thanks
Arshad Khan

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-16  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-13 10:40 [ECOS] minimum execution time with ecos M Arshad Khan
2007-04-13 14:38 ` [ECOS] " Grant Edwards
2007-04-13 14:50   ` Grant Edwards
2007-04-16  9:33 ` [ECOS] " Chris Zimman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).