|
|
| Forum Search |
|
Showing Results 1 to 10 of 250 for performance timer. (Search Link)
New Search |
Previous |
Next
If a setup a timer to tick 1000 times a second, does it actually tick at this rate? Is it guaranteed to give 1000 ticks per second? Will the timer update more than one time per tick? Like in the code below, will tick_counter++ be 1000 before an update and 1020 afterward?[code]void updateTickCounter() { tick_counter++; } [/code]
Forum: Programming Questions
nonnus29 - 6 Replies - 08/16/2007 8:01 PM do the allegro timers create much overhead ? if i dont use them at all could i expect much better timing in the rest of the app ?
Forum: Programming Questions
A J - 7 Replies - 07/31/2005 5:08 AM Hello all,I have a problem with timers and i am sure i have done a basic mistake...I have a timer named 'wait_proc' for the game logic. I just increases the variable actual_tic (+1) every call. I want it to be executed 120 times every second.I want my program to display the game as soon as possible, but I don't need to draw it if nothing in the game logic has changed. So normally the max FPS should be 120.I have another timer named 'fps_proc' for the fps count, called every second, and which store the number of frames that have been counted this second.The problem is that ...
Forum: Programming Questions
anto80 - 17 Replies - 06/26/2006 4:41 AM how can i implement a count timer from 10 to 0 second ?
Forum: Programming Questions
chin jiunn gai - 4 Replies - 01/24/2006 4:19 AM Hi, Interesting observation and wondered if anyone knew firstly why this has happened and secondly how I can get round it...I have a couple of timers running - installed via: if ( install_int_ex(timer_proc, BPS_TO_TIMER(16)) < 0 ) etc...Anyway this updates a counter so that in the main loop I can flash a small 'alive' rectangle on-screen...Now I have recently installed ntpd (network time protocol daemon) and when the date/time gets updated (usually after about a minute or so after startup), the timer_proc() function no longer gets called...Any comments/ideas?KevEDIT: Have got around ...
Forum: Programming Questions
Kev Callahan - 16 Replies - 11/24/2010 4:38 AM Hi! Is it safe install two timers that point to the same function? I want to do something like this:[code] void timer_func(void* p) { int i = ((int) p); switch (i) { ... } } END_OF_FUNCTION(timer_func);void install_timers() { volatile int param1 = 1; volatile int param2 = 2; LOCK_VARIABLE(param1); LOCK_VARIABLE(param2); LOCK_FUNCTION(timer_func); install_param_int_ex(timer_func, (void*) ¶m1, BPS_TO_TIMER(60)); install_param_int_ex(timer_func, (void*) ¶m2, BPS_TO_TIMER(60)); } [/code]
Forum: Programming Questions
Biznaga - 12 Replies - 02/18/2006 11:54 PM I've been wanting to use QueryPerformanceCounter for quite some time, and I checked out the Microsoft documentation hoping to find out everything I need to know, but what I found was a bunch of Windows code that didn't make an ounce of sense. So I guess I need a little help with figuring out how to use QPC with Allegro. Just so I don't get scolded for not trying to figure it out myself, I'm a busy high schooler who barely has any free time, and I'm used to reading the Allegro docs, which I find very easy to understand, but the Microsoft docs on the other hand... Anyway, ...
Forum: Programming Questions
Road Runner - 4 Replies - 05/15/2007 5:11 PM Ok I already asked how to use timers for my needs and such and it does work, but it's not precise. The reason it needs to be exactly precise is I'm creating a metronome where you can change the beats per minute to anything. This is the main code I am using:[code] void calculateMetronome() //This is called in the main loop { bps = ((tempo * 1000) / 60000); pause = (1000 / bps); }void handleMetronome() //This is called after calculate metronome { mettimer++; if(mettimer >= pause) { play_sample(click, 255, 128, 1000, FALSE); mettimer = 0; } }//This is the main loop void mainLoop() { ...
Forum: Programming Questions
Paladin - 15 Replies - 07/04/2006 11:07 AM can somone point me to a tutorial on timers..and how to use them?thanks
Forum: Programming Questions
Money - 12 Replies - 01/02/2006 7:43 PM The above functions are said to be the best ways to get accurate, high-resolution time from a program.I've looked up gettimeofday in a C reference, and I understand how it works. However, I've tried searching google and the MSDN for information on QueryPerformanceTimer and I have not found anything useful.I'm sorry if this is blatantly obvious, then, but how do I use QueryPerformanceTimer? And does QueryPerformanceFrequency (I think I saw that somewhere) also have a useful purpose for hi-res timing?Finally, is there a platform other than Windows where I would be better off using an ...
Forum: Programming Questions
Goodbytes - 7 Replies - 06/03/2003 8:45 PM New Search |
Previous |
Next
|