Android Question sleep 1 really the same on all devices?

MrRichard

Member
Hello to everyone.

Has sleep 1 really the same speed on all devices?

Or does it also depend on the power of the device?

For example: If I do a fly in animation with a sleep of 1 I see nearly the same speed on some phones.
But if I test this on a tablet, it is for maybe 3 or 4 times faster than on the phones I have tested.
The devices are not older than mabye 1 or 2 years.

So I think that sleep(1) is maybe enough to wait on some phones between each "fly in" step.
But maybe too less for a powerful device. Means that sleep 1 is not always the same if the device is slowing down it because of the processor?

Thanks in advance.

The fly-in procedure is simply a device-width minus X until reaching the center. A For 1 to X. Next command.
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Theoretically it is the same across all devices.
Practically it is different from device to device because of a lot of factors in the device itself.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
sleep(1) will wait for 1millisecond. It is a 1000.th of a Second.
You are expecting android doing moving a view and return to your code in this time?
 
Upvote 0
Top