public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] How to convert time tick to real time
@ 2000-11-03 14:36 Fabrice Gautier
  2000-11-03 14:51 ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Gautier @ 2000-11-03 14:36 UTC (permalink / raw)
  To: 'David Geng', ecos-discuss

> -----Original Message-----
> From: David Geng [ mailto:deli.geng@ncl.ac.uk ]
> Sent: Friday, November 03, 2000 1:04 PM
> To: ecos-discuss@sourceware.cygnus.com
> Subject: [ECOS] How to convert time tick to real time
> 
> 
> Hi,
> 
> I'd like to know the time consumed in running certain code, 
> in order to
> compare different platform as well as profile this code. I 
> used clock() and
> cyg_current_time() to get the differential time. On my 133MHz 
> SA1100 board
> the result is 29986 and 1794 respectively, while 2726 and 1001 on i386
> platform with 6x86CPU of 266MHz.
> 
> But, that is only system time, i.e., timer ticks passed. How 
> can I convert
> it to real-time, such as second. I think there should be some system
> constant containing how many timer ticks within one second, 
> or something
> like this. I can not find it, could any one help me?

You can do it using the resolution of the real-time clock.
By the way, there is already some conversion functions in C++ in the kernel.
And I send a patch about a week ago to add a C API of this functions.

RedHat guys, have you considered this patch for inclusion in your sources?

Regards,

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 



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

* Re: [ECOS] How to convert time tick to real time
  2000-11-03 14:36 [ECOS] How to convert time tick to real time Fabrice Gautier
@ 2000-11-03 14:51 ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-11-03 14:51 UTC (permalink / raw)
  To: Fabrice Gautier; +Cc: 'David Geng', ecos-discuss

Fabrice Gautier wrote:
> RedHat guys, have you considered this patch for inclusion in your sources?

I haven't forgotten about it. Just not had time to look at it (and I won't
today either, it's 11pm here!).

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

* Re: [ECOS] How to convert time tick to real time
  2000-11-03 13:04 David Geng
@ 2000-11-03 13:41 ` Jonathan Larmour
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-11-03 13:41 UTC (permalink / raw)
  To: David Geng; +Cc: ecos-discuss

David Geng wrote:
> 
> Hi,
> 
> I'd like to know the time consumed in running certain code, in order to
> compare different platform as well as profile this code. I used clock() and
> cyg_current_time() to get the differential time. On my 133MHz SA1100 board
> the result is 29986 and 1794 respectively, while 2726 and 1001 on i386
> platform with 6x86CPU of 266MHz.
> 
> But, that is only system time, i.e., timer ticks passed. How can I convert
> it to real-time, such as second. I think there should be some system
> constant containing how many timer ticks within one second, or something
> like this. I can not find it, could any one help me?

You mean CLOCKS_PER_SEC as used with the ISO standard clock() function?

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

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

* [ECOS] How to convert time tick to real time
@ 2000-11-03 13:04 David Geng
  2000-11-03 13:41 ` Jonathan Larmour
  0 siblings, 1 reply; 4+ messages in thread
From: David Geng @ 2000-11-03 13:04 UTC (permalink / raw)
  To: ecos-discuss

Hi,

I'd like to know the time consumed in running certain code, in order to
compare different platform as well as profile this code. I used clock() and
cyg_current_time() to get the differential time. On my 133MHz SA1100 board
the result is 29986 and 1794 respectively, while 2726 and 1001 on i386
platform with 6x86CPU of 266MHz.

But, that is only system time, i.e., timer ticks passed. How can I convert
it to real-time, such as second. I think there should be some system
constant containing how many timer ticks within one second, or something
like this. I can not find it, could any one help me?

Many thanks

Regards

David


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

end of thread, other threads:[~2000-11-03 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-03 14:36 [ECOS] How to convert time tick to real time Fabrice Gautier
2000-11-03 14:51 ` Jonathan Larmour
  -- strict thread matches above, loose matches on Subject: below --
2000-11-03 13:04 David Geng
2000-11-03 13:41 ` Jonathan Larmour

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).