//Logg...
...
auto clockNow = std::chrono::system_clock::now();
auto clockDateNow = std::chrono::system_clock::to_time_t(clockNow);
...
..
std::cout << "finished computation at " << std::ctime(&clockDateNow);
And i get this compiler error: " ‘ctime’: This function or variable may be unsafe. Considering using ctime_S instead. To disable depcrecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. "
Best regards!
PS First timer, using ctime and kinda chronos too…
the *_s variants are Microsoft specific and will not be able to be cross compiled for other systems. I suggest you just ignore these errors, or use a different function.
Actually ctime_s is part of C11, which means to use it in gcc you will need to just specify -std=c11.
The _s stands for safe, as you provide a buffer to return the value into rather then using a shared buffer that could get updated when writing multi threaded applications.