Call millis() before setup

cantore:
thank you for your answer. May be the program crashes also if compiling succes because of compilation order?
I found this article interesting:
Constructors, C++ FAQ it is about "static" but may be the logic is similar

Compiling translates your language instructions into machine code. As long as there exists a proper translation from language instructions to machine code, then there will be no compilation errors.
That doesn't mean that the language instructions are doing exactly what you may think you are telling it to do, though. Most software development (like most enginering) consists of figuring out where your plans/designs/rules/code/thoughts are wrong, and fixing them, until the system behaves the way you want it to.

No static checking tool (such as a compiler) can detect that you're actually telling the system to do something other than what you intended to tell it.

If you really need to run code from a constructor, that needs to run inside init(), then you can use placement new to construct this object:

char buffer[sizeof(MyClass)];
MyClass *instance;

inline void *operator new(void *ptr) { return ptr; }

void init() {
    instance = new(buffer) MyClass(constructor arguments);
}