--- In Jim Jackson <> wrote:
>
>
>
>
> On Thu, 17 Apr 2008, gebbet00 wrote:
>
> > What's the correct way to do interval measurement in TS-7400? I want
> > to know what amount of thime certain code is taking to be
executed. I do
> >
> > gettimeofday( &init_struct, NULL );
> > ...
> > code
> > ...
> > gettimeofday( &end_struct, NULL );
> >
> > but when I check tv_sec and tv_usec, values are always the same for
> > init_struct and end_struct, no matter how short or long the
> > intermediate routine is. Why?
>
> I suspect you have a bug in your code. But cannot tell without
seeing it.
>
> Here's some code I've used to do this....
>
> gettimeofday(&start, &tz);
>
> .... do stuff...
>
> gettimeofday(&tm, &tz);
>
> t=tm.tv_sec-start.tv_sec;
> t2=(tm.tv_usec-start.tv_usec)/1000;
> if (t2<0) { t2+=1000; t--; }
> printf("%d.%03d ",t,t2);
>
...that you've used in a TS-7400? I've used the same in i386 and
x86_64 systems and of course it works OK. Problem is on TS-7400.
tv_usec has the same value in start and tm.
I wanted to ask before diving into it.
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|