For 1 million invocations of boost::posix_time::ptime ptm (boost::posix_time::microsec_clock::local_time() ); // Get current time
It takes about 1 sec.
However, gettimeofday takes about 300 ms.
gettimeofday takes about 300 ms.
// struct timeval tv;
// gettimeofday(&tv, NULL);
Any pointers on why it takes so long? I want to ensure that timestamp call are not expensive. Any suggestion/recommendation?
--
-------------------------------------------------------------------
Ph : (732) 647 5679
Email: khandelwal.amit@gmail.com
Web: http://khandelwal.amit.googlepages.com/home
-------------------------------------------------------------------