Results 1 to 4 of 4

Thread: [2005] How to use Timers

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    [2005] How to use Timers

    I have an app that is very CPU intensive, so I am trying to cut anywhere that I can. So I was wondering what would be recommended. I have a few different things that need to be triggered at certain intervals, not necessarily the same interval. Would it help any to use one timer and if statements to do the processes? Meaning have counter variables and if counter = this then. Or should I use multiple timers, or is there a better way to trigger these events?
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: [2005] How to use Timers

    can any of the code be reworked to use events instead of timers? or are all the things that need to be triggered, simply based on timed intervals?

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: [2005] How to use Timers

    They are things based on timed intervals. This is an application that is recording 4 video streams at the same time (there's the CPU usage). The timed stuff is a display of current recording time, and the audio levels, and drive space left, and a couple other items.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: [2005] How to use Timers

    i would imagine that fewer timers would help performance, but the only sure way would be to do a little testing on your end to see which method works better.. if its very minimal gain, but requires code that is a lot harder to maintain, it may not be worth it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width