Top "Chrono" questions

<chrono> is the C++11 library for representing and manipulating time.

Is there a way to assign zero to std::chrono::nanoseconds

Is there a way to assign zero to a duration of type std::chrono::nanoseconds? I tried duration::zero but …

c++ c++11 chrono
Handling an update loop using C++ Chrono?

I'm definitely a bit lost with the new C++ chrono library. Here I have an update loop. It runs two …

c++ milliseconds chrono
std::chrono: add custom duration to time_point

The following code does compile (g++ 4.7.2): #include <chrono> typedef std::chrono::duration< double > double_prec_seconds; …

c++ chrono
Store timestamps in nanoseconds c++

My goal is to store timestamps in the range of nanoseconds. Let's say that I have two machines that needs …

c++ c++11 time chrono
std::string to std::chrono time_point

I have a string in the following time format: "%Y-%m-%d %H:%M:%S.%f" where the %f is …

c++ c++11 casting chrono
Is there any C++ standard class/function which is similar to GetTickCount() on Windows?

unsigned int Tick = GetTickCount(); This code is running only on Windows, but I want to use the C++ Standard library …

c++ c++11 std chrono gettickcount
How to format std::chrono durations?

Is there a convenient way to format std::chrono::duration to a specified format? std::chrono::high_resolution_clock::time_…

c++ c++11 string-formatting chrono
Get chrono seconds in float

In the example at http://en.cppreference.com/w/cpp/chrono the seconds value is obtained in a double. This …

c++ floating-point chrono seconds
What type to use for a timeout variable in C++?

When writing a function in C++ that takes a timeout as one of its arguments, what type should I use …

c++ c++11 chrono
undefined reference to `boost::chrono::system_clock::now()' - Boost, and cpp-netlib

I come here to ask for a fix to a situation that has been frustrating me. A lot. First of …

c++ boost boost-thread undefined-reference chrono