ts-7000
[Top] [All Lists]

Re: [ts-7000] Interval measurement in TS-7400

To:
Subject: Re: [ts-7000] Interval measurement in TS-7400
From: Jim Jackson <>
Date: Thu, 17 Apr 2008 22:33:59 +0100 (BST)


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);


------------------------------------

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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU