public void measure(long latency)
	{
		numoperations++;
		totallatencysum+=latency;
		windownumoperations++;
		windowtotallatencysum+=latency;
		//do comparison in milliseconds
		if((((double)(latency))/1000) < (expected*1000))
			numsatisfyingops++;
		//write it to the latency file of this thread
		/*try {
			printer.write((((double)(latency))/1000)+"");
		} catch (IOException e) {
			e.printStackTrace();
		}*/
		/*tmpLatencies[(numoperations-1)%LATENCY_ARRAY_SIZE] = ((double)(latency))/1000;
		if(numoperations%LATENCY_ARRAY_SIZE == 0){
			Vector<Double> test= arrayToVector(tmpLatencies);
			latencies.addAll(test);
		}*/

		if ( (min<0) || (latency<min) )
		{
			min=latency;
		}

		if ( (max<0) || (latency>max) )
		{
			max=latency;
		}
	}