Results 1 to 4 of 4

Thread: Timers

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 1999
    Location
    NY, USA
    Posts
    270

    Post

    Does a timer with a smaller interval take up more memory than one with a larger one? (i.e. 1 vs. 1000)

    ------------------
    Tom Young, 14 Year Old
    [email protected]
    ICQ: 15743470
    AIM: TomY10
    PERL, JavaScript and VB Programmer

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111

    Post

    I would think it would depend on the function of what the timer is doing like if it was just keeping time you could use 500 or so I'ld just make the interval as high as possible like you wouldn't keep time with a 1 interval.

    ------------------
    DiGiTaIErRoR

  3. #3
    Junior Member
    Join Date
    Nov 1999
    Location
    Houston, TX - USA
    Posts
    21

    Post

    It depends on what the timer is doing in your code. Remeeber that the timer executes your code at every tic, so you need to manage your memory by analyzing what you want to have done.

    if the timer will execute your code only once,disable it programatically. Then enable it again, also programatically, when you need it later

    ------------------
    Paul Stermann
    DSI-Houston

  4. #4
    Member
    Join Date
    Jan 1999
    Location
    Gig Harbor, WA, USA
    Posts
    48

    Post

    It's not that it takes up more memory, but a minute bit of processing power. The code it executes is what determines the memory footprint, along with how much processing it requires. I've written many apps with a Timer.Interval set to 1, but because it's not executing much code, you don't even notice.

    ------------------
    (¯`·.¸¸.·´¯`·->ShadowCrawler<-·´¯`·.¸¸.·´¯)
    Teenage Programmer
    Visual Basic, HTML, C++, JavaScript

    http://welcome.to/X12Tech
    Email: [email protected]
    ICQ#: 9872708

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