-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix some Bug( add matches times ), add run parameters.
- Loading branch information
Showing
5 changed files
with
86 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// Created by 李鑫 on 2019/1/22. | ||
// | ||
|
||
#ifndef STEREOVO_TIC_TOC_HPP | ||
#define STEREOVO_TIC_TOC_HPP | ||
|
||
|
||
#include <ctime> | ||
#include <cstdlib> | ||
#include <chrono> | ||
|
||
class TicToc { | ||
public: | ||
TicToc() { | ||
tic(); | ||
} | ||
|
||
void tic() { | ||
start = std::chrono::system_clock::now(); | ||
} | ||
|
||
double toc() { | ||
end = std::chrono::system_clock::now(); | ||
std::chrono::duration<double> elapsed_seconds = end - start; | ||
return elapsed_seconds.count() * 1000; | ||
} | ||
|
||
private: | ||
std::chrono::time_point<std::chrono::system_clock> start, end; | ||
}; | ||
|
||
|
||
#endif //STEREOVO_TIC_TOC_HPP |
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