Board index » delphi » Need timer help.

Need timer help.

Quote
{*word*104}Cir wrote:

> I'm writting an application that uses a timer.  It's set to actuate every
> 5 seconds at which time it does some checking of running tasks (using
> GetWindow).  It then does some writing to disk. This program runs in the
> background while I run other applications.  I'm running on a machine (with
> Windows 3.1) that is also on a Novell network (this may or not be
> relevent) and every so often (maybe once a week) the computer locks up.
> I'm not sure if it's my software doing this or not but I am suspicious.
> Does anybody know if there are restrictions on what can be done during
> this timer routine?  Is there a problem writing to disk if the timer
> interrupted during another applications disk access?  Is there a way to
> look at the system and see if it is save to write to disk.  Any ideas?

> Damian Bonicatto
> PTM
> ______________________________________________________________
> *** Creators of {*word*104}Circuit and {*word*104}Circuit Plus ***
> {*word*104}Circuit and {*word*104}Circuit Plus are electronic encyclopedias of circuits, formulas, etc.  Try a FREE download demo at:
> http://members.aol.com/{*word*104}cir/index.html

Have you tried shutting down your program for a week to see if that is
the cause? You shouldn't have any trouble under the current
configuration of the timer and the network...

Hope this helps.

Rodney Rindels
Programmer Extraordinaire

 

Re:Need timer help.


I'm writting an application that uses a timer.  It's set to actuate every
5 seconds at which time it does some checking of running tasks (using
GetWindow).  It then does some writing to disk. This program runs in the
background while I run other applications.  I'm running on a machine (with
Windows 3.1) that is also on a Novell network (this may or not be
relevent) and every so often (maybe once a week) the computer locks up.
I'm not sure if it's my software doing this or not but I am suspicious.
Does anybody know if there are restrictions on what can be done during
this timer routine?  Is there a problem writing to disk if the timer
interrupted during another applications disk access?  Is there a way to
look at the system and see if it is save to write to disk.  Any ideas?

Damian Bonicatto
PTM
______________________________________________________________
*** Creators of {*word*104}Circuit and {*word*104}Circuit Plus ***
{*word*104}Circuit and {*word*104}Circuit Plus are electronic encyclopedias of circuits, formulas, etc.  Try a FREE download demo at:
http://members.aol.com/{*word*104}cir/index.html

Re:Need timer help.


Quote
{*word*104}Cir wrote:

> I'm writting an application that uses a timer.  It's set to actuate every
> 5 seconds at which time it does some checking of running tasks (using
> GetWindow).  It then does some writing to disk. This program runs in the
> background while I run other applications.  I'm running on a machine (with
> Windows 3.1) that is also on a Novell network (this may or not be
> relevent) and every so often (maybe once a week) the computer locks up.
> I'm not sure if it's my software doing this or not but I am suspicious.
> Does anybody know if there are restrictions on what can be done during
> this timer routine?  Is there a problem writing to disk if the timer
> interrupted during another applications disk access?  Is there a way to
> look at the system and see if it is save to write to disk.  Any ideas?

> Damian Bonicatto
> PTM
> ______________________________________________________________
> *** Creators of {*word*104}Circuit and {*word*104}Circuit Plus ***
> {*word*104}Circuit and {*word*104}Circuit Plus are electronic encyclopedias of circuits, formulas, etc.  Try a FREE download demo at:
> http://members.aol.com/{*word*104}cir/index.html

--
If there's a possibility that your routine could take more than 5
seconds to complete you should turn the timer call off while the routine
is running to prevent double calls. If you've already done this, I have
no further ideas.

Quote

Daniel Persson, Malmoe, Sweden
daniel.pers...@swipnet.se
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Re:Need timer help.


{*word*104}Cir <{*word*104}...@aol.com> wrote in article
<19970228003900.TAA05...@ladder02.news.aol.com>...

Quote
> I'm writting an application that uses a timer.  It's set to actuate every
> 5 seconds at which time it does some checking of running tasks (using
> GetWindow). It then does some writing to disk. This program runs in the
> background while I run other applications.  I'm running on a machine
(with
> Windows 3.1) that is also on a Novell network (this may or not be
> relevent) and every so often (maybe once a week) the computer locks up.

In the Delphi help file, it is said that GetWindow may actually miss a bit
and get into an infinite loop. This may explain why your computer locks
up. See Delphi 1.0 help on EnumWindows (reputed to be more reliable!)

Quote
> I'm not sure if it's my software doing this or not but I am suspicious.
> Does anybody know if there are restrictions on what can be done during
> this timer routine?  

Funny enough, I have very much the same problem in the same environment
including Novell networking on a similar application. Except I am only
using GetFreeSystemResources & GlobalCompact(-1) plus GetModuleUsage
on the timer event.
It is actually a menu program which sits in the background waiting for the
application to terminate in order to logout from Novell and unmap drives.
It works well with a plethora of applications, except for 2 - one GPF's and

takes away Windows 3.11 after causing GPF in GDI.EXE, then USER.EXE
then TASKMAN and so on, the other one locks the computer when it exits
(while it seems to do a lot of disk writing for some strange reason!) while
my menu is loaded (and globalcompacting of course!!).

Quote
>Is there a problem writing to disk if the timer
> interrupted during another applications disk access?  Is there a way to
> look at the system and see if it is save to write to disk.  Any ideas?

Not being a Windows programmer (well until I had to do these things!) I am
very interested in opinions on this subject. Please try to also include
copies
by email!

Quote
> Damian Bonicatto
> PTM
> ______________________________________________________________
> *** Creators of {*word*104}Circuit and {*word*104}Circuit Plus ***
> {*word*104}Circuit and {*word*104}Circuit Plus are electronic encyclopedias of

circuits, formulas, etc.  Try a
-------
Iris Radulescu
Monash University Library

Other Threads