Replacing delay with millis in sketch

Any ideas on how to replace delay with millis in the sketch? please advice as im stucked with this for quite some time... >:(

This is my sketch for UV light sensor ML8511

int UVOUT = A0; //Output from the sensor
int REF_3V3 = A1; //3.3V power on the Arduino board

void setup()
{
Serial.begin(9600);

pinMode(UVOUT, INPUT);
pinMode(REF_3V3, INPUT);

}

void loop()
{
int uvLevel = averageAnalogRead(UVOUT);
int refLevel = averageAnalogRead(REF_3V3);

//Use the 3.3V power pin as a reference to get a very accurate output value from sensor
float outputVoltage = 3.3 / refLevel * uvLevel;

float uvIntensity = mapfloat(outputVoltage, 0.99, 2.8, 0.0, 15.0); //Convert the voltage to a UV intensity level

Serial.print("output: ");
Serial.print(refLevel);

Serial.print("ML8511 output: ");
Serial.print(uvLevel);

Serial.print(" / ML8511 voltage: ");
Serial.print(outputVoltage);

Serial.print(" / UV Intensity (mW/cm^2): ");
Serial.print(uvIntensity);

Serial.println();

delay(100);
}

//Takes an average of readings on a given pin
//Returns the average
int averageAnalogRead(int pinToRead)
{
byte numberOfReadings = 8;
unsigned int runningValue = 0;

for(int x = 0 ; x < numberOfReadings ; x++)
runningValue += analogRead(pinToRead);
runningValue /= numberOfReadings;

return(runningValue);
}

//The Arduino Map function but for floats
//From: map to floating point - Frequently-Asked Questions - Arduino Forum
float mapfloat(float x, float in_min, float in_max, float out_min, float out_max)
{
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

What sketch would that be ?
What have you tried ?

Any ideas on how to replace delay with millis in the sketch?

With a text editor.

please advice as im stucked with this for quite some time...

Well, I can certainly see why. You have NO f**king code that uses delay(). Or, you couldn't be bothered sharing the code or even saying why problems you are having doing something dirt simple.

Editing your post makes people that commented on the original contents of the post (or the extreme lack of) look like fools. Now, you expect us fools to help you? Dream on.

The demo Several Things at a Time illustrates the use of millis() to manage timing without blocking. It may help with understanding the technique.

...R

As the program stands now I can't immediately see why you would want to use millis() instead of delay(). Are you planning to expand your program ?

Although delay() has a bad reputation there is nothing wrong with using it in the right circumstances.