Timer duration double on Adafruit Trinket vs Arduino Uno

I have a piece of code that for some reason the timerDuration runs for double the time specified on the Adafruit Trinket 5V. i.e. it runs for 10 seconds rather than 5 seconds.

When I use the exact same code on an Uno the timerDuration is correct.

They are both 16Mhz 5V boards.

Can someone please take a look?

const int buttonPin = 2;
const int ledPin = 13;
const int heaterPin = 5;

int ledState = LOW;
int heaterState = LOW;
int buttonState;
int lastButtonState = LOW;

long lastDebounceTime = 0;
long debounceDelay = 50;

long timeOn = 0;
long timerDuration = 5000;

void setup() {
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(heaterPin, OUTPUT);

  while (millis() < 5000 ) {
    if((millis() % 1000) > 500){
      digitalWrite(ledPin, HIGH);
    } 
    else {
      digitalWrite(ledPin, LOW);
    }
  }

  digitalWrite(ledPin, LOW);
}

void loop() {

  int reading = digitalRead(buttonPin);

  if (reading != lastButtonState) {

    lastDebounceTime = millis();
  } 

  if ((millis() - lastDebounceTime) > debounceDelay) {

    if (reading != buttonState) {
      buttonState = reading;

      if ((buttonState == HIGH) && (ledState == LOW)) {
        ledState = HIGH;
        heaterState = HIGH;
        timeOn = millis();
      }
      else if ((buttonState == HIGH) && (ledState == HIGH)) {
        ledState = LOW;
        heaterState = LOW;
      }
    }
  }

  if ((millis() - timeOn) > timerDuration) {
    ledState = LOW;
    heaterState = LOW;
  }

  digitalWrite(ledPin, ledState);
  digitalWrite(heaterPin, heaterState);

  lastButtonState = reading;
}

From http://www.adafruit.com/product/1501

Internal oscillator runs at 8MHz, but can be doubled in software for 16MHz

Yep exactly right, I didn't realise the Trinket, both 5 volt and 3.3 volt run at 8Mhz by default.

Thanks!