How to create "complex" project structures in esp-idf?

Where do you put your delay ?
How do you implement this delay ?
Using freeRtos ?