No announcement yet.

Setting and Getting time

  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting and Getting time

    Hi all,

    I am trying to set up a time stamping thing with the XportAR. Is there any way to get the current time in seconds?

    I would prefer that it be referenced from January 1, 1980 00:00, but i can just shift as needed if it's not.

    I can get current time when my device first turns on (via UDP socket) and keep that as a reference, and use the OSTimeMark functions from there, but i see that OSElapsedTimeCurrentSec knows what the current time is, Is there anyway to get that number directly? Can I set current time?

    Many Thanks,
    Ilya C
    Oddly Enough,
    Ilya C

  • #2
    The XPort AR does not have a real time clock or any support for NTP.

    The API you referenced returns the seconds that have elapsed since the device was powered on or reset.



    • #3
      Ilya, you should look at our NTP posts in the Evolution forum. I have an NTP implementation running on XPort-Pro and Matchport-AR's that works very well. I retrieve a timestamp via NTP and then generate an offset from the onboard clock to do exactly what you are talking about. Seems to be accurate down to +/- 2 sec.