EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: epicsTime.cpp Strangeness
From: "Denison, PN \(Peter\)" <[email protected]>
To: <[email protected]>
Date: Thu, 1 Nov 2007 11:37:50 -0000
I'm having a little trouble using epicsTimeDiffInSeconds().
src/libCom/osi/epicsTime.cpp:970 in R3.14.9

Whilst it should be straightforward, I'm getting some strange results
that I hope someone can shed light on.

The trace below is triggered when epicsTimeDiffInSeconds(new, last)
returns a -ve number. I've printed the secsSinceEpoch and nsec fields of
each of the epicsTimeStamp structures. 'diff' is the return value from
the function call. I've also printed DBL_MAX, which should be
1.7976931348623157e+308, but isn't.

0x1ec5ab00 (scan0.1): TCP provider "MRF EVR" provides backwards time!
new = 562760425s, 0ns, last = 562760425s, 983327000ns
diff=-2.28999e+226
0x1ec5ab00 (scan0.1): DBL_MAX is -2.28999e+226
0x1ec48800 (timerQueue): TCP provider "MRF EVR" provides backwards time!
new = 562760479s, 583936000ns, last = 562760479s, 583937000ns
diff=-2.28999e+226
0x1ec48800 (timerQueue): DBL_MAX is -2.28999e+226

It appears that there are two problems: 1) somewhere in the bowels of
the construction of 2 C++ objects, and calling operator- there is an
exception being raised, causing the function to return -DBL_MAX. 2)
Somehow the vxWorks compiler (gcc 2.96) is failing to represent DBL_MAX
properly.

Any clues? I'm sure there were very good reasons to do all the time code
in C++, but it seems to be confusing rather than helping at the moment.

-- 
Peter Denison, Senior Software Engineer, Diamond Light Source Ltd.
Tel: +44 1235 778511
(apologies in advance for the lines below. Some bits are a legal
requirement and I have no control over them)

<DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. 
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
</FONT></DIV> 


Replies:
RE: epicsTime.cpp Strangeness Denison, PN (Peter)

Navigate by Date:
Prev: Re: GNU make multiple jobs option Andrew Johnson
Next: RE: epicsTime.cpp Strangeness Denison, PN (Peter)
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: GNU make multiple jobs option Andrew Johnson
Next: RE: epicsTime.cpp Strangeness Denison, PN (Peter)
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·