In resource/csdk/connectivity/src/caretransmission.c there is a
calculation for currentTime in micro seconds, that is using 1e9 instead of
1e6.

My question to the android maintainers, is this what you?re really wanting?

uint64_t getCurrentTimeInMicroSeconds()
{
        OIC_LOG(DEBUG, TAG, "IN");
        uint64_t currentTime = 0;

#ifdef __ANDROID__
        struct timespec getTs;

        clock_gettime(CLOCK_MONOTONIC, &getTs);

        currentTime = (getTs.tv_sec * (uint64_t)1000000000 + 
getTs.tv_nsec)/1000;
        OIC_LOG_V(DEBUG, TAG, "current time = %d", currentTime);
#else

Reply via email to