MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkWindowsRealTimeClock.cpp
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
14
15#include "windows.h"
16#include <chrono>
17#include <ctime>
18
19
27
35
37{
38 if ( !QueryPerformanceFrequency(&m_Frequency) )
39 {
40 m_Frequency.QuadPart = 0;
41 }
42}
43
48{
49 return std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now().time_since_epoch()).count();
50}
51
56{
57 return this->m_Frequency;
58}
virtual LARGE_INTEGER GetFrequency()
returns the QueryPerformanceFrequency
virtual double GetCurrentStamp()
returns the current time in milliseconds as a double
virtual ~WindowsRealTimeClock()
basic destructor