Question about delay()

I'm moving away from the Arduino IDE and towards manually writing makefiles and using avr-gcc to generate my compiled firmware.

The first thing I noticed is that the useful function delay() is no longer available because that appears to be a part of the whole Arduino IDE circus.

So what do the non-IDE crowd use instead of delay()? Do they write their own? What documentation should I be looking at?

You’d have better luck with questions like this over on the AVRfreaks site:
The equivalent “functions” are provided by the avr gcc libc library package
(that comes with avr-gcc - which is also included with the Arduino build enviornment).
The specific routines you are looking for are contained in <util/delay.h>
and are _delay_us() and _delay_ms()

The documentation for these is in the gcc libc manual which can
be found on the avr libc home page: AVR Libc Home Page
The direct link to the online avr libc manual is here: avr-libc: AVR Libc
and the direct link to the delay functions is here: avr-libc: <util/delay.h>: Convenience functions for busy-wait delay loops

Make sure you carefully read the documentation on the delay functions
and understand how to properly use the functions.
There are some restrictions on how they can be used, like
you cannot pass them variables, the arguments MUST be constants
and you MUST have optimization enabled on compiler.

If you are wanting to completely leave the Arduino IDE behind then I suggest that you
really take a read of the AVR libc manual and also go over to the AVRfreaks site
and read many of the tutorials on their gcc forum.

Also, make sure to start with a decent makefile template. Many of the ones out
there are really REALLY bad and will not create proper .hex files.
They screw up the objcopy command and don’t copy the .data segment.
(We have been battling this with many users over the years and quite a bit recently)

My recommendation is that you grab a well written makefile to start with
rather than try to create one on your own from scratch and especially
don’t use make files you see on many of the tutortial sites you find out
there by googling. (I found that 2/3s of them are bad or broken)

There is a very nice template makefile available in the WINavr and Arduino toolsets.

If using the windows Arduino IDE then grab the makefile in:
If getting from WINavr then grab the makefile in:

These are the sample makefiles you want to start with.

— bill