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]

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?

Many thanks

Regards

David



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