Detecting nonergodicity in continuous-time spin systems