this enables various internal components which use timestamps to have timestamps
that can be used
Depends on D11027
this enables various internal components which use timestamps to have timestamps
that can be used
Depends on D11027
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
How about using global variable static unsigned int ts ?
static unsigned int ts = 0; //global variable in suite_helpers.c
Because the timestamp of each function begins with 0 so timestamp 0 is used in the functions at the same time.
e.g.
//In test code drag_object(...); //timestamp 0 is used with evas_event_feed_mouse_move wheel_object_at(...); //timestamp 0 is used with evas_event_feed_mouse_move
BTW, can we use the real timestamp value here?
It seems that the unit of input event timestamp is 1ms.
unsigned int cur_timestamp = (unsigned int)(ecore_time_get() * 1000); evas_event_feed_mouse_move(e, x, y, cur_timestamp, NULL); usleep(1000); cur_timestamp = (unsigned int)(ecore_time_get() * 1000); evas_event_feed_mouse_down(e, 1, 0, cur_timestamp, NULL);
I am not sure if the above code may cause a problem. (usleep() increases ecore_time_get() but usleep() does not increase ecore_loop_time_get())
Hm these are good points. We can use unsigned int here and start with a value of 1.
I considered using the real time, however, and I decided to just use local monotonic variables for two reasons:
I suppose I could change it to use a monotonic global uint which resets on test shutdown, which should have the same effect.
We never specifically check for the use of ms anywhere, so I'm not sure it would be especially useful? The purpose of having timestamps is just to detect event ordering and set thresholds for changing behaviors, and 1ms is already too fast to be a "real" event in this case, so it seems to me there isn't much point in converting to that.