Posted 04 January 2015 - 04:08 AM
I am having trouble with a CC program I'm using to control a Big Reactors reactor and turbine. The code still lacks a whole lot but once I get this basic part down I should be fine.
Here is the code: http://pastebin.com/2kjSbjHC
The part I'm having trouble with is the function manual(). I can't figure out a way to make the timer work to refresh the information on the screen once per second. It will start out at the proper refresh rate, but it seems every time an event is fired (namely monitor_touch) the refresh rate speeds up, almost double. It gets to the point where if you click the monitor too many times, the program will crash and the monitor will simply freeze until you terminate it.
What is the proper way to go about doing this?
Thank you!
Here is the code: http://pastebin.com/2kjSbjHC
The part I'm having trouble with is the function manual(). I can't figure out a way to make the timer work to refresh the information on the screen once per second. It will start out at the proper refresh rate, but it seems every time an event is fired (namely monitor_touch) the refresh rate speeds up, almost double. It gets to the point where if you click the monitor too many times, the program will crash and the monitor will simply freeze until you terminate it.
What is the proper way to go about doing this?
Thank you!