ts-7000
[Top] [All Lists]

[ts-7000] Re:TS-Linux difftime

To:
Subject: [ts-7000] Re:TS-Linux difftime
From: Mike Dodd <>
Date: Mon, 05 Dec 2011 08:23:23 -0500
Joel Morgan wrote:
> I have difftime() working under TS-Linux on a 7260. The timing seems to 
> be off a little but I haven't investigated it yet.

> Gnu libc manual says 
> that time_t is just a double and you can subtract your two values. 
> difftime() is supposed to the be more portable though.

I wrote my own:

----------
double my_difftime (time_t t1, time_t t0)
{
   return (double)(t1) - (double)(t0);
}
----------

This works perfectly. I could have implemented it as a macro, but what 
the heck....

Strangely, when I added it to my test program, the regular difftime() 
began to work! Maybe he timing issue you mentioned is in play.

I'll stick with my function. :-)

-- 
Mike

Mike Dodd
Louisa County, VA USA

http://mdodd.com


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

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