Why is micros() so much slower than millis()?

Try change this
if(timer >= 1000000){
to this
if(timer >= 1000000UL){
.