how to keep track of lease time
1 posts in topic
Flat View  Flat View

Posted By:   Anonymous
Posted On:   Wednesday, September 26, 2001 11:58 PM

Hi i have to write a server which is used by clients for a given period of time ,the usage time is sent by the client.After the time elapses the cleint shud get the message that time over and then disconnect
i have to write a tcp/ip,udp and rmi version of the server for it

Re: how to keep track of lease time

Posted By:   Madheswaran_Rathinam  
Posted On:   Thursday, October 4, 2001 05:54 AM

u can use the following code snippet...

long writeStartTime = System.currentTimeMillis();

// Ur code comes here.

long timeTaken = System.currentTimeMillis() - writeStartTime;

this gives the consumed time in milliseconds.

hope this helps,


About | Sitemap | Contact