|
Boost Users : |
Subject: [Boost-users] boost::posix_time::ptime - performance
From: amit khandelwal (khandelwal.amit_at_[hidden])
Date: 2008-09-09 13:33:18
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_at_[hidden] Web: http://khandelwal.amit.googlepages.com/home -------------------------------------------------------------------
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