Get lastrequest time from client

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

Post Reply
aliko
Posts: 117
Joined: 09 Mar 2013, 16:26

Get lastrequest time from client

Post by aliko »

Hello,

I want to get last request time from client.
How can i do that?

Best Regards
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Get lastrequest time from client

Post by Bax »

Can you better explain please? Do you mean the time when the last request was sent by the client to the server?
Paolo Bax
The SmartFoxServer Team
aliko
Posts: 117
Joined: 09 Mar 2013, 16:26

Re: Get lastrequest time from client

Post by aliko »

yes how can i get the last request was sent by the client to the server?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Get lastrequest time from client

Post by Lapo »

On the server side you can do this:

Code: Select all

long lastReqTime = user.getLastRequestTime();
which returns a timestamp in milliseconds.

On the client side there is no such thing. If you need it on the client side, you will need to keep a time variable and update it when you send something.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply