Timer , Delay & Counter problems with using C ANSI to program ARDUINO UNO

Hi ,

I use C ANSI to program arduino uno , some problems appears when using delay & timer.
like using this code , problem appear with timer counter
//*********************************
#define F_CPU 2000000UL
#include <avr/io.h>

int main (void)
{
DDRB = 0b00000001;
PORTB = 0b00000000;
TCCR1B |= 1<<CS10;
int repeatcount = 0;
while(1)
{
if (TCNT1 > 10000)
{
repeatcount ++;
TCNT1 = 0;
if (repeatcount > 100)
{
repeatcount = 0;
PORTB ^= 1<<PINB0;
}
}
}
}
//********************************

i tested the same code using atmega328p and no problems with it , the code run correctly without any problems .

#define F_CPU 2000000UL

Are you overclocking your chip?