Maximum time for Display() ?

Started by snowsnowsnow, September 21, 2020, 03:33:34 AM

Previous topic - Next topic

snowsnowsnow

The documentation for Display() says the maximum value for the "time" parameter is 3600 (i.e., one hour).  This seems like an odd limit and I'm kind of curious about 1) Is it true? and 2) If so, why this value?

I just tested with a very large value and it didn't generate any error.  But, of course, this is the sort of thing that is tedious to test - I don't want to have to wait an hour to see what happens.  So, I'm hoping for an official word.

The docu doesn't say what happens if you exceed this value.

I'm guessing that it either "just works" - i.e., that there isn't really a limit or that it just ends after an hour (i.e., that any value greater than 3600 is treated as 3600).  Which is it?

td

Not completely sure about your version of WinBatch but the current version just sets the time to 3600 if the input time exceeds 3600.  Of course, the value of 3600 is equivalent to one hour.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

OK - I'd assume it's probably the same for me.  That was I assumed, given that it doesn't generate an error.  Of course, then the question becomes: Should it not generate an error, since you've clearly done something out-of-bounds, and something that, if you haven't read the docu carefully, won't do what you expect?

So, that answers the question of what happens.  But I'm still curious as to why.

Do you have any insight as to why this limit exists?

P.S.  It looks like the workaround would be to basically have a loop, like:

Code (winbatch) Select
secs = 10000
WHILE secs > 3600
Display(3600, ...)
secs = secs - 3600
ENDWHILE
Display(secs,...)


td

Sounds more like a minor documentation issue.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

Indeed.  It is often easier to change the documentation than to fix the code.

td

In this case, changing the code is easier than changing the documentation but that is not the point.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade