@@ -31,17 +31,6 @@ namespace Internals {
3131
3232namespace { // helpers namespace
3333
34- static double ElapsedSeconds (const std::chrono::steady_clock::time_point& rStartTime)
35- {
36- using namespace std ::chrono;
37- return duration_cast<duration<double >>(steady_clock::now () - rStartTime).count ();
38- }
39-
40- static bool PathExists (const fs::path& rPath)
41- {
42- return fs::exists (rPath);
43- }
44-
4534template <typename T>
4635static void CheckStream (const T& rStream, const fs::path& rPath)
4736{
@@ -522,17 +511,17 @@ class FileCommunication : public Communication
522511 void WaitForPath (const fs::path& rPath) const
523512 {
524513 CO_SIM_IO_INFO_IF (" CoSimIO" , GetEchoLevel ()>0 ) << " Waiting for: " << rPath << std::endl;
525- while (!PathExists (rPath)) {
514+ while (!fs::exists (rPath)) {
526515 std::this_thread::sleep_for (std::chrono::milliseconds (5 )); // wait 0.001s before next check
527516 }
528517 CO_SIM_IO_INFO_IF (" CoSimIO" , GetEchoLevel ()>0 ) << " Found: " << rPath << std::endl;
529518 }
530519
531520 void WaitUntilFileIsRemoved (const fs::path& rPath) const
532521 {
533- if (PathExists (rPath)) { // only issue the wating message if the file exists initially
522+ if (fs::exists (rPath)) { // only issue the wating message if the file exists initially
534523 CO_SIM_IO_INFO_IF (" CoSimIO" , GetEchoLevel ()>0 ) << " Waiting for: " << rPath << " to be removed" << std::endl;
535- while (PathExists (rPath)) {
524+ while (fs::exists (rPath)) {
536525 std::this_thread::sleep_for (std::chrono::milliseconds (5 )); // wait 0.001s before next check
537526 }
538527 CO_SIM_IO_INFO_IF (" CoSimIO" , GetEchoLevel ()>0 ) << rPath << " was removed" << std::endl;
0 commit comments