We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is code in startBox.cpp and finishBox.cpp:
startBox.cpp
finishBox.cpp
unsigned long seconds = 10; unsigned long milliSeconds = 0; phone->getCurrentUnixTimeStamp(&seconds, &milliSeconds); int size = sprintf(cmd, "http://skimb.xelfi.cz/timing/add?when=%ld%d&type=START", seconds, milliSeconds);
The time can be wrong when milliSeconds < 100.
milliSeconds < 100
The text was updated successfully, but these errors were encountered:
The following code prints the milliseconds correctly:
long sec = 10; long millis = 9; char buffer[256]; snprintf(buffer, 256, "time: %d%03d", sec, millis); printf("%s\n", buffer);
Sorry, something went wrong.
It has to be :
snprintf(buffer, 256, "time: %ld%03d", sec, millis);
Seconds are long.
Fine with me. Just provide the commit, please.
ppisl
No branches or pull requests
There is code in
startBox.cpp
andfinishBox.cpp
:The time can be wrong when
milliSeconds < 100
.The text was updated successfully, but these errors were encountered: