Type:
Compiler/Assembler:
Here is the cdelay.h I use for most of my projects. It requires defining the symbol F_CPU with the number of cpu cycles, but then you can do delays in ns, us, ms, or s.
It will always select the next higher delay.
The _approx functions may add up to 5 more cycles of delay at the savings of flash.