Skip to content
New issue

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

Add mgos_sntp_get_last_synced_uptime() #4

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

kzyapkov
Copy link

Okay, force-pushing a branch to it's merge-base with the upstream main branch automatically closes the associated pull request. Sorry about the duplicate.

This adds double mgos_sntp_get_last_synced_uptime() as proposed in #3 , but keeps bool mgos_sntp_is_synced() since that's what is needed most frequently anyway, including in the source of this lib itself.


double mgos_sntp_get_last_synced_uptime(void);

bool mgos_sntp_is_synced(void);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we don't need this method, just add comment to mgos_sntp_get_last_synced_uptime that it returns 0 until synced.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a shorthand for the mos frequent use of this API, including

if (s_state.synced) {
. But OK.

@kzyapkov kzyapkov force-pushed the add_is_synced branch 3 times, most recently from 78cef6c to 0445a80 Compare February 15, 2021 21:10
@rojer rojer merged commit d9f7fd7 into mongoose-os-libs:master Feb 16, 2021
@rojer
Copy link
Contributor

rojer commented Feb 16, 2021

merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants