|
-
Oct 20th, 2011, 11:10 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Monitor TimeOfDay
I'm just looking for some insight or some opinions on the best methods that are out there for monitoring the time of day. I know I could use a timer, but for my particular application I'm working on I'd prefer just to avoid doing so lol. So if there are any other ways of doing so I would greatly appreciate it.
Keep in mind too this needs to run as silently as possible in the background.. so maybe a thread? I'm new to those as well and am unaware of there performance for long time use and all that other mumbo jumbo.
Last edited by DavesChillaxin; Oct 20th, 2011 at 11:16 AM.
-
Oct 20th, 2011, 12:46 PM
#2
Re: Monitor TimeOfDay
hmm.. If you do not wish to use Timer, then you could schedule your application to run at particular time, using Windows scheduler.
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
-
Oct 20th, 2011, 08:16 PM
#3
Thread Starter
Hyperactive Member
Re: Monitor TimeOfDay
 Originally Posted by akhileshbc
hmm.. If you do not wish to use Timer, then you could schedule your application to run at particular time, using Windows scheduler.

ohh no no no. What I mean is methods of "recreating" what a timer object does, but simply all it will do is monitor the time of day in the background triggering notifications as necessary. IE a scheduler program, which will in turn notify the user of any appointments as they occur.. I'm just interested to see what other alternatives there are out there and available.
-
Oct 20th, 2011, 09:03 PM
#4
Re: Monitor TimeOfDay
There are no alternatives. You have to use a Timer. You can either make a Timer Tick once at the exact time you want something to happen or you can make a Timer Tick repeatedly and, each time, check whether it is time to perform your action.
-
Oct 20th, 2011, 09:40 PM
#5
Thread Starter
Hyperactive Member
Re: Monitor TimeOfDay
Okay, okay.. I guess I'll stick with a timer. But how would I go about calculating the offset from the actual time to the time the timer started at?
For example if I start the timer at 10:46am, then the next tick wont occur till 11:01am which if so will always yield no results seeing that all my appointments are scheduled by a 15 minute interval.. I'm just left wondering how I would go about accurately syncing my timer up with the actual time so that it always ticks with the time at 15 minute intervals. If off by even milliseconds would eventually, but surely throw off my timer.
Last edited by DavesChillaxin; Oct 20th, 2011 at 09:42 PM.
Reason: spelling
-
Oct 20th, 2011, 09:49 PM
#6
Re: Monitor TimeOfDay
The Interval of a Timer is measured in milliseconds. You can make it as accurate as you want. If it's 7 1/2 minutes until the appointed time when you Start the Timer then you set the Interval accordingly, i.e. 450000. If you need to adjust the Interval once the Timer Ticks for the first time then do so.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|