RE: [Quickfix-developers] Millisecond resolution in UTCTimeStamp
Brought to you by:
orenmnero
From: Oren M. <ore...@ya...> - 2003-11-05 21:20:13
|
In my last message "But I'm sure all do" should read "but I'm not sure all do" --- Daniel May <Dan...@ma...> wrote: > My changes only add milliseconds if the BeginString > in the message > header is >= FIX.4.2 . > The old conversion routines do NOT throw an > exception if there are > milliseconds in the time stamp, they just get > quietly > ignored. The call to strptime() was not bothered by > them. My opinion > would be that anyone talking to a > FIX.4.2 > connection > needs to be prepared to process milliseconds per the > specification. > > I will add the configuration setting if you still > think it is needed. > > Daniel > > > -----Original Message----- > From: Miller, Oren > [mailto:OM...@ri...] > Sent: Wednesday, November 05, 2003 2:37 PM > To: Daniel May; > qui...@li... > Cc: Joerg Thoennes > Subject: RE: [Quickfix-developers] Millisecond > resolution in > UTCTimeStamp > > I'd also like to add a configuration setting that > can turn on and off > sending messages with milliseconds. There may be > some fix engines > people want to talk to (QF 1.0 to 1.6 for instance!) > that will not be > able to handle them. > > > -----Original Message----- > From: Daniel May [mailto:Dan...@ma...] > Sent: Wed 11/5/2003 9:29 AM > To: qui...@li... > Cc: Miller, Oren; Joerg Thoennes > Subject: [Quickfix-developers] Millisecond > resolution in > UTCTimeStamp > I have checked in the code changes that allow > millisecond time stamp > resolution per the FIX 4.2 and later specification. > QF will check > message headers and include the milliseconds if the > BeginString >= > FIX.4.2 . > There were several files that needed to be modified, > I have listed them > below along with a few caveats concerning the > implementation. > > FieldTypes.h and FieldType.cpp > These files contain the bulk of the code changes. > I added a > private member to the class FIX::UtcTimeStamp to > hold milliseconds, > m_ms. I added a set/get for access. When you > create a > FIX::UtcTimeStamp, the default has always been to > set it to the current > time/date, this remains the same, and the > millisecond field is > populated. I chose to use > ftime() to replace time() since > it returns the time_t structure the original > FIX::UtcTimeStamp was > derived from. PLEASE NOTE: Under MS Windows > (NT,2K,XP), ftime() has at > best a resolution of 10ms on a single processor > machine, and 15ms on a > multiple processor machine. > > > FieldConvertors.h > When using UtcTimeStampConvertor to convert to a > std::string, > there is an optional bool parameter (default false) > which will force the > conversion to include .sss in the string. When > converting from a > std::string to a UtcTimeStamp, I will always parse > the milliseconds if > they are present in the format HH:MM:SS.sss, with > some basic validation. > The same holds true for UtcTimeOnlyConvertor. > > Session.cpp > When setting the SendingTime() field, I check for a > BegingString > >= BeginString_FIX42, and > include milliseconds. > > > fieldconvertorstestcase.cpp sessiontestcase.cpp > utctimeonlytestcase.cpp > utctimestamptestcase.cpp > Several of the test cases had to be modified to > properly > initialize the milliseconds in UtcTimeStamp. > I also added a test case to verify the conversion > routines. > > > > Daniel May > da...@so... > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback > Program. > Does SourceForge.net help you be more productive? > Does it > help you create better code? SHARE THE LOVE, and > help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Quickfix-developers mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-developers __________________________________ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree |