Re: I cant seem to get nanosleep to work (beginner)
From: Panama Red (complaintdepartment2002_at_yahoo.com)
Date: 03/29/05
- Previous message: David Schwartz: "Re: I cant seem to get nanosleep to work (beginner)"
- In reply to: David Schwartz: "Re: I cant seem to get nanosleep to work (beginner)"
- Next in thread: Gianni Mariani: "Re: I cant seem to get nanosleep to work (beginner)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 29 Mar 2005 03:39:34 GMT
I believe it was David Schwartz who said...
>>
>> I dont know....I was hoping youd tell me.
>
> IMO, the best way to get the elapsed time between two intervals is more
> or less like this:
>
>
> gettimeofday(&before, NULL);
> do_stuff();
> gettimeofday(&after, NULL);
>
> elapsed_time_msec=(after.tv_sec-before.tv_sec)*1000+(after.tv_usec-before.tv_usec)/1000;
Thanks, will give it a try
-- ----------------------------------------------------------------------------- Usenet Poster usenet@gnubin.com -----------------------------------------------------------------------------
- Previous message: David Schwartz: "Re: I cant seem to get nanosleep to work (beginner)"
- In reply to: David Schwartz: "Re: I cant seem to get nanosleep to work (beginner)"
- Next in thread: Gianni Mariani: "Re: I cant seem to get nanosleep to work (beginner)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|