static void _cb_pointer_frame(void *data, struct wl_callback *callback, unsigned int timestamp EINA_UNUSED);
//
+static unsigned int _timestamp_get()
+{
+ struct timespec ts;
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+
+ return ts.tv_sec * 1000 + (ts.tv_nsec / 1000000);
+}
+
// TIZEN ONLY(20160223) : Add back/menu/home key conversion support
static int
_ecore_wl2_input_convert_old_keys(unsigned int code)
if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button)))) return;
EINA_SAFETY_ON_NULL_RETURN(ev);
- ev->timestamp = (int)(ecore_time_get()*1000);
+ ev->timestamp = _timestamp_get();
ev->same_screen = 1;
ev->window = input->focus.touch->id;
ev->event_window = ev->window;
e->direction = ECORE_DETENT_DIRECTION_CLOCKWISE;
else
e->direction = ECORE_DETENT_DIRECTION_COUNTER_CLOCKWISE;
- e->timestamp = (int)(ecore_time_get() * 1000.0);
+ e->timestamp = _timestamp_get();
DBG("detent: dir: %d, time: %d", e->direction, e->timestamp);
ecore_event_add(ECORE_EVENT_DETENT_ROTATE, e, _ecore_wl2_input_detent_rotate_free, NULL);
break;