Do things in a slightly more thread-safe manner (whatever that means).

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3148 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2004-10-18 21:40:24 +00:00
parent dcea064ecb
commit aa241b22cb
2 changed files with 22 additions and 12 deletions
@@ -1,5 +1,5 @@
//
// $Id: DeltaCalculator.java,v 1.6 2004/08/27 02:20:18 mdb Exp $
// $Id: DeltaCalculator.java,v 1.7 2004/10/18 21:40:24 mdb Exp $
//
// Narya library - tools for developing networked games
// Copyright (C) 2002-2004 Three Rings Design, Inc., All Rights Reserved
@@ -93,6 +93,15 @@ public class DeltaCalculator
return _deltas[_deltas.length/2];
}
/**
* Returns true if this calculator has enough data to compute a time
* delta estimate. Stick a fork in it!
*/
public boolean isDone ()
{
return (_iter >= CLOCK_SYNC_PING_COUNT);
}
/** The number of ping/pong iterations we've made. */
protected int _iter;