Skip to content
Discussion options

You must be logged in to vote

mg_now() can't feed you wall clock if you don't tell it, Mongoose runs everywhere, and we don't know how you manage your timing.
You just need to provide a suitable timebase
That can be SNTP or your OS, (even though you don't say, you are referring to something that seems to be Unix clock)

Please see our documentation, and follow the guidelines in our tutorials.
https://mongoose.ws/documentation/tutorials/udp/sntp-time-sync/
https://mongoose.ws/documentation/tutorials/tls/

See our tests for example:

mongoose/test/unit_test.c

Lines 5370 to 5378 in 9bc4d97

extern uint64_t mg_boot_timestamp_ms;
int main(void) {
const char *debug_level = getenv("V");
if (debug_…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Comment options

You must be logged in to vote
1 reply
@scaprile
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants