Waiting-time statistics in magnetic systems