private void AddDistance(double distance, long elapsedTimeMS) { DistanceTimeTuple newPoint = new DistanceTimeTuple(distance, elapsedTimeMS); currentPointBuffer.Enqueue(newPoint); while (currentPointBuffer.Count > TargetNumPointsToDisplay) { // Pull the oldest point off and throw it away currentPointBuffer.Dequeue(); } DrawGraph(); }
private void AddDistance(double distance, long elapsedTimeMS) { DistanceTimeTuple newPoint = new DistanceTimeTuple(distance, elapsedTimeMS); currentPointBuffer.Enqueue(newPoint); while (currentPointBuffer.Count > MAX_NUM_POINTS_TO_DISPLAY) { // Pull the oldest point off and throw it away currentPointBuffer.Dequeue(); } DrawGraph(); }