Skip to content

Commit

Permalink
FabBackend: removed chrono::system_clock which does not work anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
PBrunot committed May 26, 2024
1 parent b858f87 commit e86e646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FabBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ namespace fabomatic
*/
bool FabBackend::waitForAnswer(std::chrono::milliseconds max_duration)
{
const auto start_time = std::chrono::system_clock::now();
const auto start_time = Tasks::arduinoNow();
const auto DELAY_MS = 25ms;
do
{
Expand All @@ -219,7 +219,7 @@ namespace fabomatic
{
return true;
}
} while (std::chrono::system_clock::now() < (start_time + max_duration));
} while (Tasks::arduinoNow() < (start_time + max_duration));

ESP_LOGE(TAG, "Failure, no answer from MQTT server (timeout:%lld ms)", max_duration.count());
return false;
Expand Down

0 comments on commit e86e646

Please sign in to comment.