Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #10235 > unrolled thread
| Started by | zodcomag@gmail.com |
|---|---|
| First post | 2017-03-03 02:40 -0800 |
| Last post | 2017-03-05 05:16 +0100 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Timer vs Sleep() zodcomag@gmail.com - 2017-03-03 02:40 -0800
Re: Timer vs Sleep() zodcomag@gmail.com - 2017-03-03 11:48 -0800
Re: Timer vs Sleep() "Urs Eggmann" <Urs.Eggmann@shinternet.ch> - 2017-03-04 15:37 +0100
Re: Timer vs Sleep() D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2017-03-05 05:16 +0100
| From | zodcomag@gmail.com |
|---|---|
| Date | 2017-03-03 02:40 -0800 |
| Subject | Timer vs Sleep() |
| Message-ID | <e31f2876-3728-44fc-8bec-6c2ea746602a@googlegroups.com> |
Which way demands less resources: 1. A "Timer" which starts a method every x time 2. A loop in the background, with a Sleep(x) and the loop starts the method. Thanks Henry
[toc] | [next] | [standalone]
| From | zodcomag@gmail.com |
|---|---|
| Date | 2017-03-03 11:48 -0800 |
| Message-ID | <ad8c485a-ed5f-4f54-9707-102d8627a9ca@googlegroups.com> |
| In reply to | #10235 |
Johan thanks I need to invoke an alarm, even if the main progaram is closed. I was tipped here to use another program, running all the time, in the back, unvisible, which invoked the alarm. (I do not know how to pass parameters to window's schedular). In the 2nd progarm I have no problem to make it sleep for few seconds every time I check if the time is arrived, so the Sleep() option would be better then the Timer. Am I right? Thanks
[toc] | [prev] | [next] | [standalone]
| From | "Urs Eggmann" <Urs.Eggmann@shinternet.ch> |
|---|---|
| Date | 2017-03-04 15:37 +0100 |
| Message-ID | <ei01pjF6j3oU1@mid.individual.net> |
| In reply to | #10237 |
Hi Henry, Can you describe a bit more exactly what you want to make? What is the condition, the person or signal that will trigger the alarm? Do you want to send something to somewhere or do yo want to pop up a dialog or give a audible signal? I'm shure, if the colleagues in the forum understand the question better, you will get ideas. Regards Urs <zodcomag@gmail.com> schrieb im Newsbeitrag news:ad8c485a-ed5f-4f54-9707-102d8627a9ca@googlegroups.com... > Johan thanks > I need to invoke an alarm, even if the main progaram is closed. > I was tipped here to use another program, running all the time, in the > back, unvisible, which invoked the alarm. > (I do not know how to pass parameters to window's schedular). > > In the 2nd progarm I have no problem to make it sleep for few seconds > every time I check if the time is arrived, so the Sleep() option would be > better then the Timer. > > Am I right? > > Thanks > > > >
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2017-03-05 05:16 +0100 |
| Message-ID | <si3nbcpndgk1vvd4de28irck2nu1ds470j@4ax.com> |
| In reply to | #10237 |
Replying on message of Fri, 3 Mar 2017 11:48:56 -0800 (PST) from
zodcomag@gmail.com:
Hello Henry,
>Johan thanks
>I need to invoke an alarm, even if the main progaram is closed.
>I was tipped here to use another program, running all the time, in the back, unvisible, which invoked the alarm.
>(I do not know how to pass parameters to window's schedular).
>
>In the 2nd progarm I have no problem to make it sleep for few seconds every time I check if the time is arrived, so the Sleep() option would be better then the Timer.
>
>Am I right?
>
You have to do it the other way around. You create a small Cavo
program reading the alarm set from your main program and doing
something like showing some warning (or even starting your main
program e.g. with specific parameters) when the alarm time is reached.
Then you register that program in Windows Task Scheduler to run every
so many minutes. I think 1 minute is the minimum which you can just
type and I once read that someone who wanted a task every second was
suggested to create multiple tasks:
http://superuser.com/questions/293445/windows-task-scheduler-schedule-task-to-run-once-every-10-seconds/668074#668074
Just make sure you use the UNC path. I had problems with that (see my
post here June 30 and July 13 last year) and Phil actually solved it:
I open DBSERVER to UNC paths fine..
SetDefault('\\2012-pdc\zz_DATA\')
oDB := DBSERVER{"mydata"}
And now it works fine.
Dick
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web