Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

After problem under Windows

9 views
Skip to first unread message

inform...@jrtinc.com

unread,
Oct 21, 2005, 8:48:32 AM10/21/05
to

Hello

When Windows ajusts the "Daylight Saving Time" back to normal (Normal
Eastern Time), all the "after" commands that are pending are delayed of
one hour. In my script, all the loops that are scheduled to run after a
few seconds won't run until an hour!

I did found on google a suggestion to use a proc that loops on itself,
and whose role is to detect changes in time setting and then delete and
restart all the affected "after" commands. But after some tests, we
found that it doesn't work all the time when many after commands of
little value (<50ms) are pending.

Do someone know a way to circumvent that problem.
Is this happening also under Unix/Linux or is it just another Windows
bug?
Is there a extension package out there that offer an "after" command
that do not rely on the time of the OS system, but instead on the
processor's clock tick.

Jean-Pierre


Robert Hicks

unread,
Oct 22, 2005, 10:38:44 AM10/22/05
to
This may not help but you can use "clock clicks ?-option?" and that
uses the cpu making it system independent. Maybe you can use that in
some way?

Robert

Robert Hicks

unread,
Oct 22, 2005, 10:54:24 AM10/22/05
to
This was an example of using "after" with "clock" from this group:

proc clock:set var {
global $var
set $var [clock format [clock seconds] -format %H:%M:%S]
after 800 [list clock:set $var]
}

Depending on how fine grained you want you just change [clock seconds]
to [clock ticks]...

Remember...I really have no clue what I am talking about. I am just
throwing you ideas.

Robert

Robert Hicks

unread,
Oct 22, 2005, 11:02:03 AM10/22/05
to
I ment [clock clicks]...or course. Um hmmm.

Mark Hobley

unread,
Oct 22, 2005, 1:08:03 PM10/22/05
to

Possibly use the above to check if the time has gone backwards, and if so,
invoke the missing tasks.

I recommend keeping the hardware clock at GMT, and just altering the displayed
time to your timezone. This way you never have the clock going backwards
problem, even though the displayed time suddenly jumps back an hour.

Regards,

Mark.

--
Mark Hobley
393 Quinton Road West
QUINTON
Birmingham
B32 1QE

Telephone: (0121) 247 1596
International: 0044 121 247 1596

Email: markhobley at hotpop dot donottypethisbit com

http://markhobley.yi.org/

Kevin Kenny

unread,
Oct 30, 2005, 1:50:29 PM10/30/05
to
inform...@jrtinc.com wrote:
> When Windows ajusts the "Daylight Saving Time" back to normal (Normal
> Eastern Time), all the "after" commands that are pending are delayed of
> one hour. In my script, all the loops that are scheduled to run after a
> few seconds won't run until an hour!

> Is this happening also under Unix/Linux or is it just another Windows
> bug?

I have seen the problem before; and only, ever, on Windows.
It's a bug in the Microsoft Visual C++ runtime library, and
I've been aware of it for about ten years. But Microsoft has
only recently acknowledged its existence:

http://support.microsoft.com/default.aspx?scid=kb;en-us;821231

and provides no workaround.

Microsoft's own task scheduler has the same problems:

http://support.microsoft.com/default.aspx?scid=kb;en-us;325413

This sort of problem has a long and lurid history, with Microsoft moving
the bugs around with every service pack. There simply does not appear
to be a reliable time reference to use across the transition. Even
setting the system to run in UTC doesn't always help. There have been
a number of bugs where Windows screws up timing at the US Daylight
Saving Time transitions even in a locale with non-US rules.

Part of the problem appears to be that Windows sets the hardware clock
to local time, rather than UTC, for the benefit of legacy DOS
applications. It then pulls the rug out from under itself at the
transitions.

All of the timing API's (WaitForMultipleEvents(), select(),
multimedia timers, ...) seem to share various versions of these bugs.
Believe me, I've tried. At NBC, I resorted to putting a SMPTE time
code reader on every PC in the control room, and driving the system
with interrupts from that. (But I recognize that most installations
don't have SMPTE time code wired throughout the plant, so that's
not a very portable solution...)

--
73 de ke9tv/2, Kevin

Jean-Pierre Tanguay

unread,
Oct 31, 2005, 9:43:32 AM10/31/05
to

Thank you Kevin for the explanation.

Jean-Pierre

Kevin Kenny a écrit :

0 new messages