Measuring Pulse Width

This is strange. Seems like it is triggered around the time the timer overflows. Can't explain it yet

Can you tell more about how you connected things?
which function generator you use ?
Did you use a pull down/up resistor?
Connected gnd's?