The function GetProcessTImes() returns a value in units of 100 nanoseconds, so
we were previously off by a factor of 10.
struct CPUClock
{
/**
- * Duration type. Windows measures CPU times in units of 100 nanoseconds
- * and POSIX uses microseconds, so go with microseconds for uniformity.
+ * Duration type. Windows measures CPU times, by default, in multiples of
+ * 1/64th of a second and and POSIX uses microseconds, so go with
+ * microseconds for uniformity.
*/
typedef std::chrono::microseconds duration;
* exceed the wall times.
*
* @ingroup utilities
- * @author G. Kanschat, W. Bangerth, M. Kronbichler
+ * @author G. Kanschat, W. Bangerth, M. Kronbichler, D. Wells
*/
class Timer
{
{
system_cpu_duration = (double)
(((unsigned long long)cpuTime.dwHighDateTime << 32)
- | cpuTime.dwLowDateTime) / 1e6;
+ | cpuTime.dwLowDateTime) / 1e7;
}
// keep the zero value if GetProcessTimes didn't work
#elif defined(DEAL_II_HAVE_SYS_RESOURCE_H)
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams