This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to convert time tick to real time


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]