C++ class alarm