Skip to content

Commit bd08545

Browse files
committed
Add another constructor to Timer
1 parent fd3c90b commit bd08545

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/engine/renderer-vulkan/Shared/Timer.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ static uint64_t TimeNanoseconds() {
4343
return std::chrono::duration_cast< std::chrono::nanoseconds >( Sys::SteadyClock::now().time_since_epoch() ).count();
4444
}
4545

46+
Timer::Timer( uint64_t* newTimeVar ) :
47+
timeVar( newTimeVar ) {
48+
}
49+
4650
// If newTimeVar is specified, it will be set to the Timer's runTime when the destructor is called
4751
Timer::Timer( const bool start, uint64_t* newTimeVar ) :
4852
timeVar( newTimeVar ) {

src/engine/renderer-vulkan/Shared/Timer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4141

4242
class Timer {
4343
public:
44+
Timer( uint64_t* newTimeVar = nullptr );
4445
Timer( const bool start = true, uint64_t* newTimeVar = nullptr );
4546
~Timer();
4647

0 commit comments

Comments
 (0)