 //  int difference = finish_time - start_time;
 //  Serial.println(difference);
   
-}
+}


void loop() {
//  int start_time = millis();
  memset(array,0,sizeof(array));
  
  for (int i = 0; i < numberOfReadings; i++) {
    double sample_reading = reading();
      myStats.add(sample_reading);
      // Code takes ~245 ms to run (100 readings per output reading). 
      //Adding a delay of 1 ms increases run time to 345 ms.
      delay(0);
  }
  

#include <Statistic.h>
Statistic myStats;
int sourceSensePin = A0;    // select the input pin for the potentiometer
int drainSensePin = A1;
double sourceSense = 0;
double drainSense = 0;
double sensor = 0;
int numberOfReadings = 400; // change this as required
unsigned int ADCValue;
double Vcc;
long result;
double averagedOutput;


long readVcc() {
  // Read 1.1V reference against AVcc
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(2); // Wait for Vref to settle
