tests/ecore_animators: Don't rely on consistent timing
This may break under heavy load so we shouldn't rely on it. Instead make sure that time only moves forward. Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
This commit is contained in:
parent
04829b9244
commit
d1e38b8535
|
@ -10,15 +10,8 @@
|
||||||
static double prev = 0;
|
static double prev = 0;
|
||||||
static Eina_Bool _anim_cb(void *data, double pos)
|
static Eina_Bool _anim_cb(void *data, double pos)
|
||||||
{
|
{
|
||||||
double interval = *(double *)data;
|
|
||||||
|
|
||||||
/* Make sure the intervals are within tolerances
|
|
||||||
* Ignore first and last step */
|
|
||||||
if (prev != 0 && pos != 1.0) {
|
|
||||||
fail_if(pos-prev > interval*1.1);
|
|
||||||
fail_if(pos-prev < interval*0.9);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fail_if(prev >= pos);
|
||||||
prev = pos;
|
prev = pos;
|
||||||
|
|
||||||
if (pos == 1.0)
|
if (pos == 1.0)
|
||||||
|
|
Loading…
Reference in New Issue