There is a facility in C, provided the structure "clock_T" is supported in
clock_t start, end;
start = clock();
end = clock ();
printf ("time taken for the instruction: %f \n", (start - end) /CLK_TCK);
//CLK_TCK is a constant
Krishnan C Balak
From: shekar <shekharchn@xxxxxxxxx>
To: lk lkj <ilugc@xxxxxxxxxxxxxxxxxx>
Subject: [Ilugc] Calculation of execution time
Date: Wed, 17 Mar 2004 02:28:59 -0800 (PST)
I am reading data from a parallel port. where right
now i neglected the ack part. iam simply reading the
data from port . i hv routine which inside program
counts no of times it read. but i want to do the same
for only one sec.
is there any syscall in linux will help to run
the particular code for stipulated period of time .
or else how to know the execution time of on
instruction(c language -statement) in linux.
Do you Yahoo!?
Yahoo! Mail - More reliable, more storage, less spam
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> address"
in the subject or body of the message.