Checking some inputs with no code in loop function

I am writing a class in .h and .cpp files that will go with .ino.
So to include the class i only have to write #include in .ino and the class already gets decleared, definded and one instance of it already gets intialized with using "extern" word.

All this is with goal that a user could only write the include statement in ino file. But now i have come to a problem, where i would need to put a piece of code in continues checking, like in a loop function. Is it possible to put something there without actually writing it in a .ino file? so a user could still only put the include statement? I know i could define some interputs from the .h and .cpp and accomplish this, but is there another way?

Thank you in advance to you all.

Not sure I am with you. It is common to include some example code with a library that the user would put in loop.

The only extra code that you would need to put in loop() is a call to a class function that updates whatever the class is doing. Is that such a hardship ?

If you don't want to do this then you could use a hardware timer in the class to do something periodically but that runs the risk of causing problems with something else in the sketch that uses the same timer

This is exactly the problem that the Servo library has, for example, because it prevents PWM working on some pins