mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 19:01:16 +00:00
warn about timeout limits
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@39107 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
29b0f887a3
commit
22bb719878
2 changed files with 9 additions and 2 deletions
|
@ -811,7 +811,10 @@ extern NSString* cmdVersion(NSString *ver);
|
||||||
*/
|
*/
|
||||||
- (void) setCmdDebug: (NSString*)mode withDescription: (NSString*)desc;
|
- (void) setCmdDebug: (NSString*)mode withDescription: (NSString*)desc;
|
||||||
|
|
||||||
/* Sets the interval between timeouts.
|
/* Sets the interval between timeouts.<br />
|
||||||
|
* Any value below 0.001 is ignored and 10 is used.<br />
|
||||||
|
* Any value above 300 is ignored and 60 is used.<br />
|
||||||
|
* The default value is 60 seconds.
|
||||||
*/
|
*/
|
||||||
- (void) setCmdInterval: (NSTimeInterval)interval;
|
- (void) setCmdInterval: (NSTimeInterval)interval;
|
||||||
|
|
||||||
|
|
|
@ -4917,10 +4917,14 @@ With two parameters ('maximum' and a number),\n\
|
||||||
{
|
{
|
||||||
NSTimeInterval when = cmdTimInterval;
|
NSTimeInterval when = cmdTimInterval;
|
||||||
|
|
||||||
if (delay == YES && when < 1.0)
|
if (when < 0.001 || (when < 10.0 && YES == delay))
|
||||||
{
|
{
|
||||||
when = 10.0;
|
when = 10.0;
|
||||||
}
|
}
|
||||||
|
if (when > 300.0)
|
||||||
|
{
|
||||||
|
when = 60.0;
|
||||||
|
}
|
||||||
cmdPTimer =
|
cmdPTimer =
|
||||||
[NSTimer scheduledTimerWithTimeInterval: when
|
[NSTimer scheduledTimerWithTimeInterval: when
|
||||||
target: self
|
target: self
|
||||||
|
|
Loading…
Reference in a new issue