How about put these sub-functions into a class? Maybe named NTPTest or more clear.
Then we can avoid of global variable instead of class member.