Boost logo

Boost Users :

Subject: [Boost-users] [data_time] Are posix_time functions reentrant ?
From: Ruediger Berlich (ruediger.berlich_at_[hidden])
Date: 2009-07-20 05:44:48


Hi there,

here is a question I didn't find answers on in the documentation:
Are the posix_time functions reentrant ? In particular:
In my library a number of threads instantiate objects that internally
measure the elapsed time like this:

// Measure the start time
ptime startTime = boost::posix_time::microsec_clock::local_time();
// [...]
// Has a time-out been set and if so, have we exceeded it ?
if(firstTimeOut_.total_microseconds() &&
((microsec_clock::local_time()-startTime) > firstTimeOut_)) {
   // do something
}

Best Regards,
Ruediger


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net