Clock Sync anywhere?

AscySoft

Active Member
Licensed User
Longtime User
Hi.
I'm new on this,.. I was looking for a way to synchronise device clock(or at least to obtain a real date/time) using perhaps SNTP or any NTP protocol?

This is useful in my future app because I wanna know exactly when somebody create, append delete etc from my sqlite database.

Is this thing possible in B4A? (I found at least one app doing this here: ClockSync - synchronize device clock via NTP - Android @ MoDaCo
)
PS: in .net compact framework I was able to obtain such info(over gprs)
 

AscySoft

Active Member
Licensed User
Longtime User
I checked the Net library and I saw that it is based on Apache Commons Net™ - Overview which support alot of transport protocols including a small NTP/SNTP protocol.

So I was wondering, does anybody could point me how to rip/create only this into another b4a librarry? I kinda don't know java... or is anybody else willing to create this? I don't think is to hard, if you know java.

thanks
 
Upvote 0

specci48

Well-Known Member
Licensed User
Longtime User
Can you be more precise and explain what you really want from this library?
Which feature are you missing in SPSntp?


specci48
 
Upvote 0

AscySoft

Active Member
Licensed User
Longtime User
Which feature are you missing in SPSntp?
specci48
Take this for example: a list with ntp servers: pool.ntp.org: NTP Servers in Europe, europe.pool.ntp.org
Could you implement a property say "ServerName" where the user can set/store his preffered time server...

I thank you again for this library. As far as I tested (for 5 minutes yesterday) is good. I mentioned Apache ntp-client only because is open source and well tested/implemented in many application, don't know if this code taken from stackoverflow is the same... So, thanks again!
 
Upvote 0

specci48

Well-Known Member
Licensed User
Longtime User
The reason I was asking is that the apache code and your NTPClient.java sample provide a lot a lot of features, most of the them only logged to the console. I'm sure you do not really need all those values so in my eyes it is a bit oversized relying on that library if you only want to get the current time.

Deep inside, the apache library uses the same way to get actual time as the simple SPSntp lib. So the results and stability should be the same.

Apart from the above I'll take your request and implement the option to set an an own/preffered time server. Just be patient... :) ... done... :)


specci48
 
Last edited:
Upvote 0
Top