Commit 617b5c11 authored by fmg005's avatar fmg005

Added timer to simulation

parent d1a66b2f
#include "Timer.h"
using namespace CLA;
Timer::Timer() {
start_timer = steady_clock::now();
Timer::~Timer() {
end_timer = steady_clock::now();
duration = duration_cast<milliseconds>(end_timer-start_timer).count();
std::cout<<"The simulation ran for "<< duration/1000 <<"s\n";
#ifndef TIMER_H
#define TIME_H
#include <chrono>
#include <iostream>
#include <string>
using namespace std::chrono;
namespace CLA {
class Timer {
steady_clock::time_point start_timer;
steady_clock::time_point end_timer;
time_t duration;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment