11 ,
const int subeventid
15 m_eventType = eventtype;
16 m_subeventid = subeventid;
30 if (etype != m_eventType )
45 sevt->
sub_id = m_subeventid;
49 int *d = (
int *) &sevt->
data;
50 int s = clock_gettime(CLOCK_MONOTONIC_RAW, &clk);
54 for (
int i = 0;
i < 6;
i++) *d++ = 0;
59 memcpy(d, &clk.tv_nsec,
sizeof(clk.tv_nsec));
61 *d++ = previous_clk.tv_sec;
62 memcpy(d, &previous_clk.tv_nsec,
sizeof(previous_clk.tv_nsec));
78 sevt->sub_id = m_subeventid;
81 sevt->reserved[0] = 0;
82 sevt->reserved[1] = 0;
85 int *d = (
int *) &sevt->data;
86 int s = clock_gettime(CLOCK_MONOTONIC_RAW, &clk);
90 for (
int i = 0;
i < 6;
i++) *d++ = 0;
95 memcpy(d, &clk.tv_nsec,
sizeof(clk.tv_nsec));
97 *d++ = previous_clk.tv_sec;
98 memcpy(d, &previous_clk.tv_nsec,
sizeof(previous_clk.tv_nsec));
103 sevt->sub_padding = 0;
104 sevt->sub_length += 6;
105 return sevt->sub_length;
113 os <<
"Real-time clock Device Event Type: " << m_eventType <<
" Subevent id: " << m_subeventid << endl;
119 if (etype != m_eventType)
return 0;
125 clock_gettime(CLOCK_MONOTONIC_RAW, &previous_clk);