Article View: borland.public.cppbuilder.nativeapi
Article #15683Re: Notification at certain point of time
From: Remy Lebeau (TeamB)
Date: Fri, 20 Jun 2003 20:11
Date: Fri, 20 Jun 2003 20:11
24 lines
2009 bytes
2009 bytes
"nicolasr" <nicolasrNOSPAMATSIGNgmx.net> wrote in message news:3ef361a3@newsgroups.borland.com... > how can I have my program get notified at a certain point of time? > Like a virus scanner that should be launched sunday night at 11:00. Keep track of the time you wish to be notified, and then run a loop or short timer that repeatedly queries the machine's current date/time. When the current date/time is exactly or beyond the desired time, then do your operations. > I don't want to use SetTimer (or TTimer), since it > is probably rather unprecise. Only if you are trying to use a single timer event that is triggered at a specific period of time, yes. If you want to go that approach, then you can have a look at timeSetEvent() instead. It is a multimedia timer rather than an OS timer. Multimedia timers are more precise then SetTimer() is, since multimedia timers are based on running separate threads and sleeping instead of using posted window messages. Gambit
Technical Details
Message-ID:
<3ef3697f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<3ef361a3@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,2e0b61516e44ac62 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-06-20 13:56:10 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3ef361a3@newsgroups.borland.com> Subject: Re: Notification at certain point of time Date: Fri, 20 Jun 2003 13:11:28 -0700 Lines: 26 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 207.175.226.26 Message-ID: <3ef3697f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1056139647 207.175.226.26 (20 Jun 2003 13:07:27 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail