Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer Issue
Message
From
09/04/2004 16:23:08
 
 
To
09/04/2004 16:03:39
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00893342
Message ID:
00893722
Views:
16
>Instead of dropping Timers on forms, consider procedural code to define and instantiate a timer. Further, consider a Queue of timed activities whose members have as properties
>
>1) interval in milliseconds
>
>2) action to be taken ( including object reference where that method / procedure lives)
>
>3) sum of interval values that have elapsed since action last ran
>
>* Add methods to your procedural timer class for
> - adding to the queue ( disable timer while doing this )
> - removing from the queue ( disable timer while doing this )
> - checking to see if an entry already exists in the queue.
>
>* Maintain the queue in ascending interval order. (actual timer interval is the value of the first or minimum timer queue element's interval )
>
>* Update the sums of interval values in the queue.
>
>* execute all actions ( methods / procedures ) whose sum of intervals > or = to the interval for the action, and whose oject reference is still available
>
>* Reset sum for all actions taken.
>
>* Release timer on shut down
>
>Works for me.
>
>This does not depend upon a form

Heya Robin -
mine doesn't depend on a form either -
its an application level object.
Mondo Cool Explanation ! [Bill]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform