-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
769 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
/*! | ||
* \addtogroup Blight | ||
* @{ | ||
* \file | ||
*/ | ||
#pragma once | ||
#include "libblight_global.h" | ||
#include <chrono> | ||
|
||
namespace Blight{ | ||
/*! | ||
* \brief The ClockWatch class | ||
* | ||
* A simple timer class for determening how long code takes. | ||
*/ | ||
class LIBBLIGHT_EXPORT ClockWatch { | ||
public: | ||
/*! | ||
* \brief Create a new instance and start the timer. | ||
*/ | ||
ClockWatch(); | ||
/*! | ||
* \brief Get the duration since the ClockWatch was created. | ||
* \return Duration since the ClockWatch was created. | ||
*/ | ||
std::chrono::duration<double> diff(); | ||
/*! | ||
* \brief Get the elapsed seconds since the ClockWatch was created. | ||
* \return The elapsed seconds since the ClockWatch was created. | ||
*/ | ||
double elapsed(); | ||
|
||
private: | ||
std::chrono::high_resolution_clock::time_point t1; | ||
}; | ||
} | ||
/*! @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.