[perl-win32-gui-users] Timers

2003-01-16 Thread Jonathan Southwick
I have some code that uses the Timer object but it doesn't always work 
correctly.  My code grabs the time when the program is run and determines 
how many minutes and seconds are left until the next hour.  A timer event 
is fired on the hour that kills the current timer and creates a new timer 
that fires an event every hour.


It works for a few hours and then all of the sudden it is off by 5 seconds 
or so.  It doesn't seem to be consistent either.  Sometimes it will work 
correctly for 16 hours or so and then the timing is off and sometimes it 
works for only one hour and then the timing is off.


Does anyone know why this happens?  Can it be fixed?

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755




[perl-win32-gui-users] Timers (cont)

2003-01-16 Thread Jonathan Southwick

Here is some output that gets written within the Timer event when it is fired:

It is now 08:41:24
Update in 18:36
in Update Data
killing timer after 108 seconds
setting new timer for every hour
updated data here at 09:00:00
in Update Data
updated data here at 10:00:00
in Update Data
updated data here at 11:00:00
in Update Data
updated data here at 12:00:00
in Update Data
updated data here at 13:00:00
in Update Data
updated data here at 14:00:00
in Update Data
updated data here at 15:00:00
in Update Data
updated data here at 16:00:00
in Update Data
updated data here at 17:00:00
in Update Data
updated data here at 18:00:00
in Update Data
updated data here at 19:00:00
in Update Data
updated data here at 20:00:00
in Update Data
updated data here at 21:00:00
in Update Data
updated data here at 22:00:00
in Update Data
updated data here at 23:00:00
in Update Data
updated data here at 00:00:00
in Update Data
updated data here at 01:00:00
in Update Data
updated data here at 02:00:00
in Update Data
updated data here at 03:00:00
in Update Data
updated data here at 04:00:00
in Update Data
updated data here at 04:59:55
in Update Data
updated data here at 05:59:55
in Update Data
updated data here at 06:59:55
in Update Data
updated data here at 07:59:55
in Update Data
^C


## a new run of the program ##

It is now 13:53:05
Update in 6:55
in Update Data
killing timer after 36 seconds
setting new timer for every hour
updated data here at 14:00:00
in Update Data
updated data here at 15:00:00
in Update Data
updated data here at 16:00:00
in Update Data
updated data here at 17:00:00
in Update Data
updated data here at 18:00:00
in Update Data
updated data here at 19:00:00
in Update Data
updated data here at 20:00:00
in Update Data
updated data here at 21:00:00
in Update Data
updated data here at 22:00:00
in Update Data
updated data here at 23:00:00
in Update Data
updated data here at 00:00:00
in Update Data
updated data here at 00:59:55
in Update Data
updated data here at 01:59:55
in Update Data
updated data here at 02:59:55
in Update Data
updated data here at 03:59:55
^C


## a new run of the program ##

It is now 08:24:56
Update in 35:4
in Update Data
killing timer after 210 seconds
setting new timer for every hour
updated data here at 09:00:00
in Update Data
updated data here at 10:00:01
in Update Data
updated data here at 11:00:01
in Update Data
updated data here at 12:00:01
in Update Data
updated data here at 13:00:01
in Update Data
updated data here at 14:00:01
in Update Data
updated data here at 15:00:01
in Update Data
updated data here at 16:00:01
in Update Data
updated data here at 17:00:01
in Update Data
updated data here at 18:00:01
in Update Data
updated data here at 19:00:01
in Update Data
updated data here at 20:00:01
in Update Data
updated data here at 20:59:56
in Update Data
updated data here at 21:59:56
in Update Data
updated data here at 22:59:56
in Update Data
updated data here at 23:59:56
^C




I don't know if this helps explain what I am talking about.

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755




RE: [perl-win32-gui-users] Timers

2003-01-16 Thread Peter Eisengrein
Does it do anything else besides use the timers to trigger events? I'm
wondering if it gets hung up somewhere else in the code that you can maybe
add a DoEvents() or Update()

-Original Message-
From: Jonathan Southwick [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 12:28 PM
To: [email protected]
Subject: [perl-win32-gui-users] Timers



I have some code that uses the Timer object but it doesn't always work 
correctly.  My code grabs the time when the program is run and determines 
how many minutes and seconds are left until the next hour.  A timer event 
is fired on the hour that kills the current timer and creates a new timer 
that fires an event every hour.

It works for a few hours and then all of the sudden it is off by 5 seconds 
or so.  It doesn't seem to be consistent either.  Sometimes it will work 
correctly for 16 hours or so and then the timing is off and sometimes it 
works for only one hour and then the timing is off.

Does anyone know why this happens?  Can it be fixed?

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755



---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by
implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache 
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users



RE: [perl-win32-gui-users] Timers

2003-01-16 Thread Jonathan Southwick
There are other events that usually get triggered but they do not get 
triggered during this test I am doing because the application is sitting on 
the taskbar while all this is happening.


Jonathan

At 1/16/2003 12:55 PM, Peter Eisengrein wrote:

Does it do anything else besides use the timers to trigger events? I'm
wondering if it gets hung up somewhere else in the code that you can maybe
add a DoEvents() or Update()

-Original Message-
From: Jonathan Southwick [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 12:28 PM
To: [email protected]
Subject: [perl-win32-gui-users] Timers



I have some code that uses the Timer object but it doesn't always work
correctly.  My code grabs the time when the program is run and determines
how many minutes and seconds are left until the next hour.  A timer event
is fired on the hour that kills the current timer and creates a new timer
that fires an event every hour.

It works for a few hours and then all of the sudden it is off by 5 seconds
or so.  It doesn't seem to be consistent either.  Sometimes it will work
correctly for 16 hours or so and then the timing is off and sometimes it
works for only one hour and then the timing is off.

Does anyone know why this happens?  Can it be fixed?

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College, Meadville, PA 16335
(814) 332-2755



---
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by
implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
___
Perl-Win32-GUI-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users