diff --git a/connectivity/drivers/cellular/TELIT/ME310/TELIT_ME310_CellularStack.cpp b/connectivity/drivers/cellular/TELIT/ME310/TELIT_ME310_CellularStack.cpp index 1d0b25f91a..fcd7ae6456 100644 --- a/connectivity/drivers/cellular/TELIT/ME310/TELIT_ME310_CellularStack.cpp +++ b/connectivity/drivers/cellular/TELIT/ME310/TELIT_ME310_CellularStack.cpp @@ -436,7 +436,7 @@ nsapi_size_or_error_t TELIT_ME310_CellularStack::socket_recvfrom_impl(CellularSo // read() should not fail success = false; } - } else if (timer.read_ms() < ME310_SOCKET_TIMEOUT) { + } else if (std::chrono::duration_cast(timer.elapsed_time()) < std::chrono::milliseconds(ME310_SOCKET_TIMEOUT)) { // Wait for URCs _at.process_oob(); } else {