Help with timing interupt for temp probe running a relay

Hi all. I am building a control for a freezer. I need to start the freezer at the specified temp and shut off when that is satisfied. (I have that) What I'm having trouble with is, I need to have the compressor stay off for 3 minutes before starting again. This is a single stage freezer getting down to -50 F. It gets above the specified temp before 3 minutes and causes the compressor to attempt to come on and lock up. What I need, I think, is a way to override the if statement reading the probe, so the loop will not run until the 3 minutes have elapsed, without stopping the display from reading the temp. Thanks for any help.

Here is the code I'm currently using, sorry can't get it in the code window for some reason.

#include <elapsedMillis.h>

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into pin 2 on the Arduino
#define ONE_WIRE_BUS 3
#define ct 5
// Setup a oneWire instance to communicate with any OneWire devices
// (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
int offtime=1500;

void setup(void)
{ pinMode(ct, OUTPUT);
// start serial port
Serial.begin(9600);
Serial.println(" ColdTrap");

elapsedMillis elapsedTime; // used by elapsedmilis example
// Globally scoped - see comment above

unsigned long off = millis(); // used by millis() example...

unsigned int interval = 1000;

// Start up the library
sensors.begin();
}

void loop(void)
{ delay (offtime);

// call sensors.requestTemperatures() to issue a global temperature
// request to all devices on the bus
Serial.print(" ");
sensors.requestTemperatures(); // Send the command to get temperatures
Serial.println(" ");

Serial.print(" ");
Serial.print(sensors.getTempFByIndex(0)); // Why "byIndex"?
// You can have more than one IC on the same bus.
// 0 refers to the first IC on the wire
{
elapsedMillis (off);

{ if(sensors.getTempFByIndex(0) >= -50)
digitalWrite (ct, HIGH);
else
digitalWrite (ct, LOW);

do (ct,LOW);
while (off);

// I know this is wrong, this is just the latest attempt
}}}

The several things at a time post will help. When you shut off the motor, record the value of millis() (start time). Each time through loop(), check the difference between millis() and your start time. Don't allow the motor to start if the difference between millis() and the start time is less than 3 minutes. Using the technique form several things at a time you can get rid of all delay()s.

If there's truly nothing productive that the Arduino can do during those 3 minutes, then a delay((long)3*60*1000); might be one way of solving it. (The "(long)" makes the calculation a long integer as the result won't fit into a default integer on most Arduinos.

Please use code tags next time. Also try using the CTRL-T auto-format function in the Arduino IDE. It's very good at teaching you proper layout.