[Ilugc] program execution time

  • From: vprajan@xxxxxxxxx (Pushparajan V)
  • Date: Wed Jul 12 17:02:48 2006

Hi,

On 7/12/06, R. Ramkumar <andyetitmoves@xxxxxxxxx> wrote:


its a c program. i would want to embed the code to get the stamps rather
than running it at the command line.

use the std c lib function `time' at the beginning and end of the
program and subtract the values to get the time taken...


This will not work.. i have tried time() function of C. It will not come up
to nanosecond precision because it returns time_t short int..
use clock function, it will give the processing time..or times() function..
many other alternatives are there.. google on..

it moves on...

--
April 1: This is the day upon which we are reminded of
what we are on the other three hundred and sixty-four.
          -- Mark Twain, "Pudd'nhead Wilson's Calendar"
_______________________________________________
To unsubscribe, email ilugc-request@xxxxxxxxxxxxx with
"unsubscribe <password> <address>"
in the subject or body of the message.
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc




-- 
"Life is very short.
What is the need for living for ourselves?
Lets live for others.
Our life will be longer than we believe :-)"

Rajan VP

<blog> http://vprajan.blogspot.com ;</blog>

Other related posts: