-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added clang-tidy script and applied suggested fixes
- Loading branch information
Showing
118 changed files
with
1,532 additions
and
1,280 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
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
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
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,17 +1,18 @@ | ||
#include <iostream> | ||
#include <chrono> | ||
#include <iostream> | ||
|
||
class Timer | ||
{ | ||
public: | ||
explicit Timer(const double scale) : _beg(_clock::now()), _scale(scale) {} | ||
void reset() { _beg = _clock::now(); } | ||
double elapsed() const { | ||
return _scale * std::chrono::duration_cast<_second>(_clock::now() - _beg).count(); } | ||
using second = std::chrono::duration<double, std::ratio<1>>; | ||
return _scale * std::chrono::duration_cast<second>(_clock::now() - _beg).count(); | ||
} | ||
|
||
private: | ||
typedef std::chrono::high_resolution_clock _clock; | ||
using _clock = std::chrono::high_resolution_clock; | ||
std::chrono::time_point<_clock> _beg; | ||
const double _scale; | ||
typedef std::chrono::duration<double, std::ratio<1>> _second; | ||
}; |
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
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.