utils#

acore_server_monitoring_measurement.utils.every(seconds: int, verbose: bool = True)[source]#

Execute tasks at precise N-second intervals, aligned with the clock. The script runs at exact multiples of N seconds past the minute, ensuring consistent timing. For instance, with N=30, executions occur at :00 and :30 of each minute (e.g., 08:10:00, 08:10:30, 08:11:00)

Usage example:

for _ in every(30):
    # do something