From: ppisa Date: Thu, 25 Nov 2004 19:17:00 +0000 (+0100) Subject: Merge: Returned back filling of CAN messages timestamps for RT-Linux variant. X-Git-Tag: CLT_COMM_CAN_usb_can1_kriz_bp~84 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/lincan.git/commitdiff_plain/2400133f2d0cb18784a9c2edb4d5e58a8500d175?hp=6986182b7f31b1ef6adc1369e71baa3bbbffdf0a Merge: Returned back filling of CAN messages timestamps for RT-Linux variant. Merge commit 'remotes/sf-ocera-lincan/master' --- diff --git a/lincan/include/can_sysdep.h b/lincan/include/can_sysdep.h index 6061542..3966e8f 100644 --- a/lincan/include/can_sysdep.h +++ b/lincan/include/can_sysdep.h @@ -16,6 +16,7 @@ #include #include #include +#include #endif /*CAN_WITH_RTL*/ /*#define __NO_VERSION__*/ @@ -205,7 +206,12 @@ extern can_spinlock_t can_irq_manipulation_lock; /* CAN message timestamp source, it is called from interrupt context */ -#define can_gettimeofday(ptr) do { ;} while(0) +#define can_gettimeofday(ptr) do {\ + struct timespec temp_timespec;\ + clock_gettime(CLOCK_REALTIME,&temp_timespec);\ + ptr->tv_usec=temp_timespec.tv_nsec/1000;\ + ptr->tv_sec=temp_timespec.tv_sec;\ + } while(0) #endif /*CAN_WITH_RTL*/