How can i set "The time limit of the animation should be max 10 - 12 seconds. The communication has to be finished within that time frame"
Please help for this
You can use the setTimeout() function to establish a timed delay before some action is taken. You haven't explained enough to offer more information.