News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Test code for using sntp to synchronize clock

Started by jimg, December 21, 2019, 06:02:11 AM

Previous topic - Next topic

jimg

This is some code I've been playing with to get an accurate time from an NTP time server.  I'll use the actual final product to update some microcontrollers and ds3231 modules, etc.

I thought I'd dump it here in case anyone else wanted to play with it.  It is hereby released to the public domain for all uses public and private without reference to me.  Use it any way you want.

This is pretty much a dead topic.   Now we just let windows set our time.

I started with six_L code from 2006.  This used a daytime server to get the time, but I learned a lot on how to communicate with a server using windows sockets.  I've included the original six_L code in the zip file.  Many thanks to six_L.

It now requires administrator privilege to update your clock, so I added a manifest requiring the permissions.

Bear in mind, this is just a test platform for me to test my code, not a full blown polished app :)