Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other
Target Operating System
Linux
QNX
other
Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other
SDK Manager Version
2.1.0
other
Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other
Issue Description
- when running the code below, i see a difference between the OS time and the nvidia time.
this difference changes across reboots, i’ve seen a difference of 10seconds, 20seconds…
how do i keep these clocks in synced? where can i read documentation about it? - i’d like to be able to sync the OS time using ntp/ptp, but when i try i see that this only affects the OS time, not the nvidia time. what’s the best practice to using ntp/ptp?
#include <dw/core/context/Context.h>
#include <dw/core/base/Version.h>
#include <time.h>
#include <cstdio>
int main()
{
dwContextHandle_t context1;
dwInitialize(&context1, DW_VERSION, nullptr);
struct timespec realtime;
if (clock_gettime(CLOCK_REALTIME, &realtime) != 0) {
perror("CLOCK_REALTIME");
}
dwTime_t time1;
dwContext_getCurrentTime(&time1, context1);
std::printf("clock_gettime: %ld %ld\n", realtime.tv_sec, realtime.tv_nsec);
std::printf("DriveWorks1: %ld %ld\n", time1 / 1000000, time1 % 1000000);
}