Skip to content

Commit

Permalink
Raise an issue if clock time is before script save time
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Jan 16, 2024
1 parent 3ac37a7 commit f0e142e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions services/zero_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ def run(self):


def main():
# Get the last modified time in epoch format
last_modified_time = os.path.getmtime(os.path.realpath(__file__))
if time.time() < last_modified_time:
raise OSError("The current file modification time is after the current"
" time, so there is an issue with the clock !")
epilog = "example:\narecord --disable-softvol " \
"-D plughw:CARD=U18dB,DEV=0 -r 48000 -f FLOAT_LE -c 1 -t raw" \
" | python3 -u zero_record.py -p 10001 \n\n" \
Expand Down

0 comments on commit f0e142e

Please sign in to comment.