diff --git a/ovni.c b/ovni.c index dabcf29..f009b58 100644 --- a/ovni.c +++ b/ovni.c @@ -389,17 +389,13 @@ flush_evbuf() static void ovni_ev_set_clock(struct ovni_ev *ev) { - ev->header.clock_lo = (uint32_t) (rthread.clockvalue & 0xffffffff); - ev->header.clock_hi = (uint16_t) ((rthread.clockvalue >> 32) & 0xffff); + ev->header.clock = rthread.clockvalue; } uint64_t ovni_ev_get_clock(struct ovni_ev *ev) { - uint64_t clock; - - clock = ((uint64_t) ev->header.clock_hi) << 32 | ((uint64_t) ev->header.clock_lo); - return clock; + return ev->header.clock; } void diff --git a/ovni.h b/ovni.h index add2527..8bf666b 100644 --- a/ovni.h +++ b/ovni.h @@ -52,8 +52,7 @@ struct __attribute__((__packed__)) ovni_ev_header { uint8_t model; uint8_t class; uint8_t value; - uint32_t clock_lo; - uint16_t clock_hi; + uint64_t clock; }; struct __attribute__((__packed__)) ovni_ev {