[date_time] Posix timespec support?
Does date_time support POSIX timespec? I assume that timespec is standard POSIX. Is it not? If so, is it supported now, or how should it be supported. I'd be willing to help. terry
Terry G wrote:
Does date_time support POSIX timespec?
Nope.
I assume that timespec is standard POSIX. Is it not? If so, is it supported now, or how should it be supported. I'd be willing to help.
I guess the question is, what do you mean by 'supported'. Date time uses timeval (that's 'val' not 'spec') under the hood on posix platforms to implement microsecond_clock, but doesn't directly expose timeval in the interface. The higher resolution interfaces supported by timespec seem to NOT be implemented many places. So really, I can't see what timespec brings for people trying to write portable code. So, what did you have in mind for 'support'? Jeff
Jeff wrote:
So really, I can't see what timespec brings for people trying to write portable code. So, what did you have in mind for 'support'?
I was looking at IEEE Std 1003.1 2004 Edition, int clock_gettime(clockid_t, struct timespec*); http://www.opengroup.org/onlinepubs/009695399/ These are real-time extensions to POSIX, I gather. timespec seemed "standard" enough to have an easy conversion to ptime. Something like time_from_ftime(const FILETIME&); time_from_timespec<T>(const timespec&) perhaps. This would be "portable" for systems using real-time POSIX. I'm a date_time newbie, so perhaps I'm missing something fundamental. date_time is huge! I had no idea. terry
participants (2)
-
Jeff Garland
-
Terry G