9 Reusable Code Snippet Topics
Remove Filter
|
|
##This project implements a multiple timer application. It was written in 1. Python 3.8.2 2. wxPython 4.1.0 Feel free to experiment. Here are some possible enhancements: 1. Add the ability to run a program when the timer expires. With a little scripting you could, for example, schedule the sending of … |
|
This is a timer class that I wrote a while ago (cleaned up a bit for the snippet) for adding delays in some of the games I have written over the years. Note: I normally have the class functions in a .cpp file but since it looks like I can … |
|
A simple timer for Excel VBA Excel VBA does not have a timer control. The alternative is to use the Timer() Function, and that leaves much to be desired. This code should be placed in a code module. My need was to tend to an abandoned program that was waiting … |
|
I needed a 5 minute countdown for a project I was working on so I hacked this up, It does nothing more and nothing less. Figured I would post it while I was here to save someone else the trouble. (Not that it's in anyway difficult to do.) |
|
No bells and whistles, just a quickie millisecond timer showing an alternative to the far less portable clock_t method. A test main() is included, just define TEST_DRIVER as a macro or remove the conditional compilation at the end. |
|
Start a new console application and fill in the about 70 lines of code in the Program.cs file. Run and enjoy! |
|
My not OO version of timer for work and pause time (but it does use attributes for functions, which are objects, to avoid global declarations in functions). |
|
The code demonstrates running program limitted time by following going over endtime expressed in seconds since midnight, so might fail for playing just midnight (add check that endtime is less than 24*60*60 if you want to be sure). Exciting action :) of the program is that it shows remaining time … |
|
Start a new Forms application. Drop a Panel and a Timer control on it. Set up a Timer_Tick, Form_Load and a Panel_Paint eventhandler and fill in the code. Run the app and watch the string rotate. |
The End.