Thread: timing until event - computationally expensive ?

  1. #1
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385

    timing until event - computationally expensive ?

    i need to run a seconds timer for a certain event, this may run for upto a month, so im thinking this is quite expensive and generally a poor way to do it. Is there another way, i suppose i could match a time against the system clock, any feedback appreciated.
    Monday - what a way to spend a seventh of your life

  2. #2
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    How about loading the current calendar time into a tm struct and calculating the timer from a saved value when you need it? That would be a lot more efficient than continually updating the timer if you don't look at it very often :-)
    *Cela*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 03:27 AM
  2. Event driven thread programming
    By jaxen in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 08:46 AM
  3. Actors, cues, event based logic.
    By Shamino in forum Game Programming
    Replies: 2
    Last Post: 04-27-2006, 10:58 PM
  4. Replies: 2
    Last Post: 09-22-2003, 01:47 PM