NJ.
NJ.

Reputation: 2185

In Flex, is there a way to determine how long an HTTPService.send() call takes round-trip?

I am looking to find out and track how long a round-trip to the server is taking. Just kinda curious more than anything.

Upvotes: 0

Views: 375

Answers (1)

invertedSpear
invertedSpear

Reputation: 11054

set up a couple variables and store the time right before the .send() is called in one and store the time at the beginning of the result function in another. The difference of those times should be your total time to get the data.

EDIT: I had to do this today to see how long a function was running.

I declared this

private var start:Number = 0;
private var end:Number = 0;

This at the beginning of what I was timing

start = new Date().time;

This at the end of it

end = new Date().time;
Alert.show((end-start).toString());

Upvotes: 1

Related Questions