Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] Interrupt Timer

Code Maker
Years of Service
User Offline
Joined: 4th Dec 2015
Posted: 21st Jul 2017 15:06 Edited at: 22nd Jul 2017 14:04
Interrupt Timer - by Code Maker 2017

This program can periodic execute code without any calls from the
main loop

I am sure there is many applications opportunities for an interrupt
timer like this.


You sould try to keep the timer delay above 10 milliseconds or
else it will overload your system, to quote MS API SDK help files
"Periodic timer events with an event delay of 10 milliseconds or less
consume a significant portion of CPU resources."

The interrupt timer will bee killed if the window to which it has been
associated is closed.

Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 28th Jul 2017 07:33
Looks cool

What's that get ptr to function,

I didn't know that DBP had such a command.
Code Maker
Years of Service
User Offline
Joined: 4th Dec 2015
Posted: 28th Jul 2017 16:46
That command is part off the Matrix1 plugin, you will need it to run the program
wath it basically dose is to get the memory address of the InterruptTimer
function in the program, also known in programming terms as a pointer,
so it can execute the function by calling that address periodically
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Sep 2017 14:16
That is pretty cool. It has been a long time since I have used an interrupt routine. Back in the day I used to program my AtariST in Assembly language and I used to play around with interrupt routines. Nice job.

So many games to little time.

Login to post a reply

Server time is: 2023-06-07 20:59:33
Your offset time is: 2023-06-07 20:59:33