Lluvia
Duration.h
Go to the documentation of this file.
1 
8 #ifndef LLUVIA_CORE_DURATION_H_
9 #define LLUVIA_CORE_DURATION_H_
10 
11 #include <chrono>
12 #include <memory>
13 
15 
16 namespace ll {
17 
18 namespace vulkan {
19  class Device;
20 } // namespace vulkan
21 
22 class Duration {
23 
24 public:
25  Duration() = delete;
26  Duration(const Duration& duration) = delete;
27  Duration(Duration&& duration) = delete;
28 
29  Duration(const std::shared_ptr<ll::vulkan::Device> device);
30 
32 
33  Duration& operator=(const Duration& duration) = delete;
34  Duration& operator=(Duration&& duration) = delete;
35 
36  std::chrono::nanoseconds getDuration() const;
37 
38  int64_t getNanoseconds() const;
39 
40  vk::QueryPool getQueryPool() const noexcept;
41 
42  uint32_t getStartTimeQueryIndex() const noexcept;
43  uint32_t getEndTimeQueryIndex() const noexcept;
44 
45 private:
46  vk::QueryPool m_queryPool;
47 
48  std::shared_ptr<ll::vulkan::Device> m_device;
49 };
50 
51 } // namespace ll
52 
53 #endif // LLUVIA_CORE_DURATION_H_
Definition: Duration.h:22
Duration(Duration &&duration)=delete
Duration(const std::shared_ptr< ll::vulkan::Device > device)
Duration()=delete
uint32_t getStartTimeQueryIndex() const noexcept
Duration & operator=(Duration &&duration)=delete
uint32_t getEndTimeQueryIndex() const noexcept
Duration(const Duration &duration)=delete
int64_t getNanoseconds() const
Duration & operator=(const Duration &duration)=delete
vk::QueryPool getQueryPool() const noexcept
std::chrono::nanoseconds getDuration() const
Definition: Buffer.h:28