This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
How to convert time tick to real time
- To: <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] How to convert time tick to real time
- From: "David Geng" <deli dot geng at ncl dot ac dot uk>
- Date: Fri, 3 Nov 2000 21:04:09 -0000
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