#include <elapsedtime.h>
|
std::chrono::steady_clock::time_point | timeStart |
|
std::chrono::steady_clock::time_point | timeStop |
|
std::chrono::steady_clock::time_point | timeNow |
|
std::chrono::steady_clock::time_point | timeCheck |
|
ElapsedTime::ElapsedTime |
( |
| ) |
|
void ElapsedTime::printElapsedTime |
( |
| ) |
|
void ElapsedTime::printElapsedTime |
( |
string |
text | ) |
|
ElapsedTime::printElapsedTime.
- Parameters
-
136 std::cout <<
"Elapsed Time (" << text <<
"): "<<
elapsedTime<<
" s" << std::endl;
double elapsedTime
Definition: elapsedtime.h:98
bool print
Definition: elapsedtime.h:97
double ElapsedTime::getElapsedTimeMiliSeconds |
( |
| ) |
|
double ElapsedTime::getElapsedTime |
( |
| ) |
|
double split()
ElapsedTime::split, gets the current elapsed time since the start()
Definition: elapsedtime.cpp:234
double ElapsedTime::getElapsedTimeSince |
( |
double |
startTimeMjd | ) |
|
double currentmjd(double offset)
Current UTC in Modified Julian Days.
Definition: timelib.cpp:65
double ElapsedTime::getElapsedTime |
( |
double |
startMjd, |
|
|
double |
endMjd |
|
) |
| |
compute the elapsed time between the two provided times
- Parameters
-
startMjd | First time. |
endMjd | Second time. |
- Returns
- elapsed time in seconds
271 return (endMjd-startMjd)*86400;
double ElapsedTime::lap |
( |
| ) |
|
Lap Time.
This is the elapsed time since the last Lap Time. ElapsedTime::timeCheck is set in order to keep track of this event.
- Returns
- Time since last call to lap(), reset(), or start(), in seconds.
147 #ifdef CROSS_TYPE_arm 150 gettimeofday(&
timeNow,
nullptr);
153 timeNow = std::chrono::steady_clock::now();
std::chrono::steady_clock::time_point timeCheck
Definition: elapsedtime.h:68
int count
Definition: rw_test.cpp:36
double elapsedTime
Definition: elapsedtime.h:98
std::chrono::steady_clock::time_point timeNow
Definition: elapsedtime.h:68
double ElapsedTime::split |
( |
| ) |
|
ElapsedTime::split, gets the current elapsed time since the start()
- Returns
- was previously stop()
238 #ifdef CROSS_TYPE_arm 241 gettimeofday(&
timeNow,
nullptr);
244 timeNow = std::chrono::steady_clock::now();
int count
Definition: rw_test.cpp:36
double elapsedTime
Definition: elapsedtime.h:98
std::chrono::steady_clock::time_point timeStart
Definition: elapsedtime.h:68
std::chrono::steady_clock::time_point timeNow
Definition: elapsedtime.h:68
double ElapsedTime::check |
( |
| ) |
|
void ElapsedTime::reset |
( |
| ) |
|
void ElapsedTime::start |
( |
| ) |
|
ElapsedTime::start.
206 #ifdef CROSS_TYPE_arm 212 timeStart = std::chrono::steady_clock::now();
std::chrono::steady_clock::time_point timeCheck
Definition: elapsedtime.h:68
double elapsedTime
Definition: elapsedtime.h:98
std::chrono::steady_clock::time_point timeStart
Definition: elapsedtime.h:68
double ElapsedTime::stop |
( |
| ) |
|
ElapsedTime::stop.
- Returns
double split()
ElapsedTime::split, gets the current elapsed time since the start()
Definition: elapsedtime.cpp:234
void ElapsedTime::tic |
( |
| ) |
|
ElapsedTime::tic, equivalent to matlab to start a stopwatch timer.
void start()
ElapsedTime::start.
Definition: elapsedtime.cpp:203
double ElapsedTime::toc |
( |
| ) |
|
ElapsedTime::toc, equivalent to matlab to stop a stopwatch timer.
- Returns
void printElapsedTime()
ElapsedTime::printElapsedTime.
Definition: elapsedtime.cpp:115
double elapsedTime
Definition: elapsedtime.h:98
double split()
ElapsedTime::split, gets the current elapsed time since the start()
Definition: elapsedtime.cpp:234
double ElapsedTime::toc |
( |
string |
text | ) |
|
ElapsedTime::toc, equivalent to matlab to stop a stopwatch timer.
- Parameters
-
- Returns
void printElapsedTime()
ElapsedTime::printElapsedTime.
Definition: elapsedtime.cpp:115
double elapsedTime
Definition: elapsedtime.h:98
double split()
ElapsedTime::split, gets the current elapsed time since the start()
Definition: elapsedtime.cpp:234
void ElapsedTime::info |
( |
| ) |
|
ElapsedTime::info, combines toc and print, this simplifies the calling of functions.
93 #ifndef CROSS_TYPE_arm 94 std::cout <<
"system_clock" << std::endl;
95 std::cout << std::chrono::system_clock::period::num << std::endl;
96 std::cout << std::chrono::system_clock::period::den << std::endl;
97 std::cout <<
"steady = " << std::boolalpha << std::chrono::system_clock::is_steady << std::endl << std::endl;
99 std::cout <<
"high_resolution_clock" << std::endl;
100 std::cout << std::chrono::high_resolution_clock::period::num << std::endl;
101 std::cout << std::chrono::high_resolution_clock::period::den << std::endl;
102 std::cout <<
"steady = " << std::boolalpha << std::chrono::high_resolution_clock::is_steady << std::endl << std::endl;
104 std::cout <<
"steady_clock" << std::endl;
105 std::cout << std::chrono::steady_clock::period::num << std::endl;
106 std::cout << std::chrono::steady_clock::period::den << std::endl;
107 std::cout <<
"steady = " << std::boolalpha << std::chrono::steady_clock::is_steady << std::endl << std::endl;
std::chrono::steady_clock::time_point ElapsedTime::timeStart |
|
private |
std::chrono::steady_clock::time_point ElapsedTime::timeStop |
|
private |
std::chrono::steady_clock::time_point ElapsedTime::timeNow |
|
private |
std::chrono::steady_clock::time_point ElapsedTime::timeCheck |
|
private |
bool ElapsedTime::print = true |
double ElapsedTime::elapsedTime = 0. |
The documentation for this class was generated from the following files: