Skip to content

shouldn't this library set the system time, after an update() ? #150

Open
@sercona

Description

@sercona

I'm writing an app for a clock (of course..) and have been using this library for the last few weeks. I run my own ntp server (rasp pi on gps, so stratum 1, sort of) and I am logging all connections to it, so I can tell when the ESP (8266, for me) polls it.

I can set the update freq ok and it hits the server at those times. so far, so good.

but when looking at the update routine, it never SETS the system time! shouldn't it? I mean, what's the point of having ntp update your system if the local cmos clock (etc) is not updated?

at the very least, you should think about having a user callback be called when the update happens. that way, at least there's a hook I can vector off and call my own settime() routine. I realize that not everyone uses the same 'set system time' routine; some use hw clocks and some use the sw clock on the ESPs. but having a vector that the user-code can be triggered, when ntp update happens, that should be added, I would think.

additionally, it would be nice to be able to turn off auto-updates. usually, you'd send in a (0) for the arg, to tell the system not to do any more updates 'on cron' (so to speak).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions