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

Commit

Permalink
Update recorder.cpp (#1011)
Browse files Browse the repository at this point in the history
* Update recorder.cpp

* Update recorder.cpp

* Update version.sh
  • Loading branch information
David P. Chassin authored Sep 27, 2021
1 parent 128cf3d commit c875344
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
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

0 comments on commit c875344

Please sign in to comment.