COVESA/dlt-daemon

dlt_user.so send log with timestamp overflow

Closed this issue · 1 comments

uint32_t dlt_uptime(void)
{

#if defined (__WIN32__) || defined(_MSC_VER)

    return (uint32_t)(GetTickCount() * 10); /* GetTickCount() return DWORD */

#else
    struct timespec ts;

    if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
        return (uint32_t)ts.tv_sec * 10000 + (uint32_t)ts.tv_nsec / 100000; /* in 0.1 ms = 100 us */
    else
        return 0;

#endif

uint32_t maximum=4294967295

val=4294967295//10000
print(val)
print(429496/3600/24) #dlt log limit in about 5 days

Question:
If we want to keep a precision with 0.1 ms, our log timestamp limit in 5days because ot limit scope of uint32_t

maybe we should conside about change the precision of log timestamp

I would like to continue this topic in discussion tag.