Skip to content

Commit

Permalink
getTime: remove not necessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Nov 21, 2024
1 parent d18b64e commit b64f05f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libraries/WiFiS3/src/WiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,11 +551,10 @@ unsigned long CWifi::getTime() {
/* ----------------------------------------------*/
modem.begin();
string res = "";
unsigned long tt = 0;
if(modem.write(string(PROMPT(_GETTIME)),res,"%s\r\n", CMD_WRITE(_GETTIME))) {
tt = strtol(res.c_str(), NULL, 10);
return strtol(res.c_str(), NULL, 10);
}
return tt;
return 0;
}

void CWifi::setTimeout(unsigned long timeout) {
Expand Down

0 comments on commit b64f05f

Please sign in to comment.