IonicWind Software

IWBasic => General Questions => Topic started by: LarryMc on February 25, 2007, 06:08:51 PM

Title: Max timer setting
Post by: LarryMc on February 25, 2007, 06:08:51 PM
Anyone know what the max number a starttimer command can be given?
Title: Re: Max timer setting
Post by: Parker on February 25, 2007, 06:32:18 PM
I checked MSDN and I couldn't see any max value, I assume it's limited just by the total number of unsigned integers, but that's a lot of timers.
Title: Re: Max timer setting
Post by: LarryMc on February 25, 2007, 09:39:18 PM
Not the number of timers but the duration.
Title: Re: Max timer setting
Post by: Ionic Wind Support Team on February 25, 2007, 10:30:25 PM
Maximum of an integer as far as I know. Unless Microsoft has some imposed limit on it.

Why not give us some more information, like... why are you asking?  Are you having prolems?
Title: Re: Max timer setting
Post by: LarryMc on February 26, 2007, 06:33:53 AM
I'm playing around with triggering events to happen daily, weekly, monthly, etc. but not at a specific time.

I know I can:
1) use one short timer duration and increment counters then test for a given value;
2) use multiple long duration timers and no inc. counters
3) use a combination of 1 and 2.

So, I was just curious as to the biggest duration I could pass to a timer.
One hour=3,600,000
One day=86,400,000
One week=604,800,000
One year = 31,449,600,000

Like I said, just curious.

Larry
Title: Re: Max timer setting
Post by: Parker on February 26, 2007, 08:17:06 PM
Instead of waiting for a year-long timer, I'd look into using the windows scheduling service. You can probably do that with COM, but you can look up the AT command (at /help) for scheduling jobs at specific times. You can retrieve the current time and just add a month, day, year, or however long to that. It's a lot more efficient than using a timer like that I would think.