timesync.library documentation...
Posted: Fri Feb 08, 2013 12:14 am
...is practically non-existant. Thankfully there is only one function and most of the tags are pretty self-explanatory.
However, this needs explanation (as I had to work it out by trial and error):
#define RS_UTCOFFSET (TAG_USER+4) // (LONG)
Should be documented as (something like) "This tag specifies the offset of the wanted timezone in seconds ahead of UTC. eg. GMT+1 is 3600. NB: this is not the same order of magnitude nor sign as the offset returned by timezone.library"
I would also like to know what values the following tag expects:
#define RS_PROTOCOL (TAG_USER+1) // (UBYTE)
I'd have thought it would be defined RS_PROTOCOL_NTP etc, but nothing like that exists in the header.
I'd like to know what the following tag actually does:
#define RS_DIFFTIME (TAG_USER+7) // (struct timeval *)
Difference between remote and local time, perhaps? Does that take into account RS_UTCOFFSET? How does it return time behind local time, as timeval.tv_secs is unsigned?
The below are obviously error codes, but the function itself returns error codes, so what exactly are these for?
#define RS_ERRSTR (TAG_USER+8) // (STRPTR *)
#define RS_ERRNO (TAG_USER+9) // (LONG *)
However, this needs explanation (as I had to work it out by trial and error):
#define RS_UTCOFFSET (TAG_USER+4) // (LONG)
Should be documented as (something like) "This tag specifies the offset of the wanted timezone in seconds ahead of UTC. eg. GMT+1 is 3600. NB: this is not the same order of magnitude nor sign as the offset returned by timezone.library"
I would also like to know what values the following tag expects:
#define RS_PROTOCOL (TAG_USER+1) // (UBYTE)
I'd have thought it would be defined RS_PROTOCOL_NTP etc, but nothing like that exists in the header.
I'd like to know what the following tag actually does:
#define RS_DIFFTIME (TAG_USER+7) // (struct timeval *)
Difference between remote and local time, perhaps? Does that take into account RS_UTCOFFSET? How does it return time behind local time, as timeval.tv_secs is unsigned?
The below are obviously error codes, but the function itself returns error codes, so what exactly are these for?
#define RS_ERRSTR (TAG_USER+8) // (STRPTR *)
#define RS_ERRNO (TAG_USER+9) // (LONG *)