Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Update recorder.cpp #1011

Merged
merged 3 commits into from
Sep 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-aux/version.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# This file is used by autoconf to generate the version string.
# It is assumed that this script is run from the top-level srcdir.
EXE=$0
Expand Down
7 changes: 7 additions & 0 deletions module/tape/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ static int recorder_open(OBJECT *obj)
gl_error("invalid interval value (%d)", my->interval);
return 0;
}
char buffer[1024];
int minimum_timestep = atoi(gl_global_getvar("minimum_timestep",buffer,sizeof(buffer)-1));
if ( minimum_timestep > 0 && my->interval > 0 && my->interval < minimum_timestep )
{
gl_warning("%s <recorder:%d> interval %d is less than minimum timestep, setting interval to %d", obj->name?obj->name:"(unnamed)", obj->id, my->interval, minimum_timestep);
my->interval = minimum_timestep;
}

/* if no filename given */
if (strcmp(my->file,"")==0)
Expand Down