Added toServerTime().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2818 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Client.java,v 1.42 2003/09/25 15:57:38 mdb Exp $
|
// $Id: Client.java,v 1.43 2003/09/30 22:18:18 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.client;
|
package com.threerings.presents.client;
|
||||||
|
|
||||||
@@ -299,6 +299,17 @@ public class Client
|
|||||||
return stamp + _serverDelta;
|
return stamp + _serverDelta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a client clock reading to a value comparable to a server
|
||||||
|
* time stamp.
|
||||||
|
*/
|
||||||
|
public long toServerTime (long stamp)
|
||||||
|
{
|
||||||
|
// when we calcuated our time delta, we did it such that: C - S =
|
||||||
|
// dT, thus to convert server to client time we do: S = C - dT
|
||||||
|
return stamp - _serverDelta;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if we are logged on, false if we're not.
|
* Returns true if we are logged on, false if we're not.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user