Thanks. So we could check whether clock_gettime() exists or not during configure and then in code if needed we fall back to gettimeofday().
2017-04-24 15:40 GMT+08:00 Michael Pearce <[email protected]>: > Hi, > > clock_gettime i believe was made native available in macOS Sierra (10.12). > > prior versions though don't afaik. Though with the aggressive upgrade of > OSX on apple devices that apple push, to end users is this really a concern? > > As per posix guidance also, what you suggest is also recommended as > gettimeofday is obsolescent. > > http://pubs.opengroup.org/onlinepubs/9699919799/ > functions/gettimeofday.html > > Regards > Mike > > ________________________________________ > From: Paul Guo <[email protected]> > Sent: Monday, April 24, 2017 6:36 AM > To: [email protected] > Subject: s/gettimeofday/clock_gettime/ in hawq? > > Hi, > > HAWQ sometimes use gettimeofday() syscall for some timeout check in various > module, however it could be affected by ntp, so the timeout checking logic > could be wrong sometimes. I would propose to use clock_gettime() to replace > it on Linux (I have not investigated the alternative on other platforms > e.g. mac). Both gettimeofday() and clock_gettime() are fast vdso sys call > so I do not expect there is performance loss in some case where there are > frequent calls of gettimeofday(). By the way, I found some gettimeofday() > calls on postgresql and gpdb, so they might have this issue also. > > Regards, > > Paul > The information contained in this email is strictly confidential and for > the use of the addressee only, unless otherwise indicated. If you are not > the intended recipient, please do not read, copy, use or disclose to others > this message or any attachment. Please also notify the sender by replying > to this email or by telephone (+44(020 7896 0011) and then delete the email > and any copies of it. Opinions, conclusion (etc) that do not relate to the > official business of this company shall be understood as neither given nor > endorsed by it. IG is a trading name of IG Markets Limited (a company > registered in England and Wales, company number 04008957) and IG Index > Limited (a company registered in England and Wales, company number > 01190902). Registered address at Cannon Bridge House, 25 Dowgate Hill, > London EC4R 2YA. Both IG Markets Limited (register number 195355) and IG > Index Limited (register number 114059) are authorised and regulated by the > Financial Conduct Authority. >
