MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Samples / elapsed

Method elapsed

framework/timer.h:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 */
80 template <typename T = DefaultResolution>
81 double elapsed()
82 {
83 if (!running)
84 {
85 return 0;
86 }
87
88 Clock::time_point start = start_time;
89
90 if (lapping)
91 {
92 start = lap_time;
93 }
94
95 return std::chrono::duration<double, T>(Clock::now() - start).count();
96 }
97
98 /**
99 * @brief Calculates the time difference between now and the last time this function was called

Callers 2

do_compute_workMethod · 0.80
renderMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected