| View previous topic :: View next topic |
| Author |
Message |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Wed May 06, 2009 10:29 pm Post subject: Which is easier on my CPU usage? |
|
|
I just want to have my PC beep every 30 minutes or so as a reminder not to slouch horribly and sit semi-properly
which would be easier on my CPU?
a simple
| Code: | loop:
Beep(3000, 600);
Sleep(whatever time);
goto loop; |
or while loop or something else?
I plan on putting it in the startup folder so it is always running in the background (FreeConole();) so I want to make sure it uses the least amount of resources as possible.
Thanks for any suggestions, manc.
(Also, what is the default build directory for Borland Builder C++ 2007? I need to find my .exe )
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Wed May 06, 2009 11:32 pm Post subject: |
|
|
| why don't you just use the built in scheduler that just so happens to be a windows feature?
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Wed May 06, 2009 11:43 pm Post subject: |
|
|
Wow I didn't even know about it.
Where is it located?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu May 07, 2009 12:00 am Post subject: |
|
|
| start -> run -> taskschd.msc
|
|
| Back to top |
|
 |
Jani Grandmaster Cheater
Reputation: 2
Joined: 29 Dec 2006 Posts: 804
|
Posted: Thu May 07, 2009 12:50 am Post subject: |
|
|
Event driven programming FTW :) Well, if you want easy solutions (like batch), yeah, I second slovach: control panel -> scheduled tasks -> add scheduled task OR win+r control schedtasks.
The most user friendly way I see is win32, no window, but a tray icon w/ exit menu, then just create a timer, and here we go.
| manc wrote: | | (FreeConole();) | If you want to do it that way, just do a win32 project and you won't have a console.
| slovach wrote: | | start -> run -> taskschd.msc | Didn't work for me, I'm missing some adminstration kit or you're on Vista? Control schedtasks works tho. WXPSP3Pro w/ admin kits, guess you're on Vista?
|
|
| Back to top |
|
 |
|