Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkSchedulableProcess.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkSchedulableProcess_h
18 #define mitkSchedulableProcess_h
19 
20 #include <boost/chrono.hpp>
21 #include <MitkSimulationExports.h>
22 
23 namespace mitk
24 {
25  class MITKSIMULATION_EXPORT SchedulableProcess
26  {
27  public:
28  explicit SchedulableProcess(int priority = 0);
29  virtual ~SchedulableProcess();
30 
31  int GetPriority() const;
32  boost::chrono::nanoseconds GetTotalElapsedTime() const;
33  void ResetTotalElapsedTime(boost::chrono::nanoseconds carryover = boost::chrono::nanoseconds::zero());
34  boost::chrono::nanoseconds GetElapsedTime() const;
35 
36  protected:
37  void SetElapsedTime(boost::chrono::nanoseconds elapsedTime);
38 
39  private:
41  SchedulableProcess& operator=(const SchedulableProcess&);
42 
43  int m_Priority;
44  boost::chrono::nanoseconds m_TotalElapsedTime;
45  boost::chrono::nanoseconds m_ElapsedTime;
46  };
47 }
48 
49 #endif
DataCollection - Class to facilitate loading/accessing structured data.