Author Topic: Timer Class  (Read 3490 times)

0 Members and 2 Guests are viewing this topic.

kryton9

  • Guest
Timer Class
« on: June 26, 2011, 10:10:58 PM »
Updated:

Here is the latest Timer Class for review? I am not sure whether FPS needs to be in this or not as FPS doesn't need high res timer, so I am thinking of making that a separate class.
Unzip it into OxygenBasic. It will add into the inc folder  a go2 subfolder with the inc files.
It will also add to the project folder a TimerCTest folder with the test program inside.

oxygenbasic
    inc/go2/.. 2 new inc files
    project/TimerCTest/.. 1 test program
« Last Edit: June 29, 2011, 02:30:10 AM by kryton9 »

Charles Pegge

  • Guest
Re: Timer Class
« Reply #1 on: June 26, 2011, 10:40:57 PM »
Thanks Kent,

This affinity stuff is new to me. I think it is quite easy to measure lapsed time in microseconds with QueryPerformanceCounter. . WM_TIMER messages are hopelessly inaccurate, and only fit for counting seconds.

Charles

kryton9

  • Guest
Re: Timer Class
« Reply #2 on: June 26, 2011, 10:59:59 PM »
We need to probably make a thread class too. Once we get the timer class working we can then make the thread class.  All of the high end gaming development kits use threads, one for rendering, input, sound... etc. I think I read somewhere that UDK (the Unreal Development Kit) runs 8 of them in parallel.

Charles Pegge

  • Guest
Re: Timer Class
« Reply #3 on: June 26, 2011, 11:59:13 PM »

I've done some work on multithreading already. String memory management including garbage collection is the major issue.

examples/system/threads

Just update Oxygen (in-progress)

Charles

kryton9

  • Guest
Re: Timer Class
« Reply #4 on: June 29, 2011, 01:50:21 AM »
Updated a working timer class in first post.

Charles Pegge

  • Guest
Re: Timer Class
« Reply #5 on: June 29, 2011, 03:38:34 AM »

Thanks Kent,

I am working on the thread side. Then we can have timers running in the background, making callbacks etc

Charles.

kryton9

  • Guest
Re: Timer Class
« Reply #6 on: June 29, 2011, 12:15:54 PM »
Great, that will be cool.