Thanks for your comments!
I've never worked with libraries and classes before so I have only a rough idea of what to do and where to achieve what I want.
Jimmy60 and majenko are right, I should add a variable to the library and access it from the sketch using functions instead of declaring it as global and extern. In this particular case, reading through the Time library (with Notepad++ instead of Wordpad this time, what a difference it makes!!), I found the function called timeStatus() that returns the Status, and I can use it from the sketch to check whether the time needs sync or not.
PaulS is right too, I just realised that I need a time interval for the number of sync failures, not just an ammount.