Formatieren Sie eine Posix-Zeit mit nur 3 Stellen in Sekundenbruchteilen
Was ist das Äquivalent vonmicrosec_clock
für Millisekunden im folgenden Code?
#include <boost/date_time/posix_time/posix_time.hpp>
int main()
{
boost::posix_time::ptime date_time = boost::posix_time::microsec_clock::local_time();
const std::string str_time = boost::posix_time::to_simple_string(date_time);
std::cout << str_time << std::endl;
return 0;
}
output: 25.01.2015, 16: 26: 14.932738
Ich brauche die folgende Ausgabe:
output: 25. Januar 2015, 16: 26: 14.932