Does anyone know what time it is? SYS$GETTIM - VMS
This is a discussion on Does anyone know what time it is? SYS$GETTIM - VMS ; I'm developing an application on VAX/Alpha/Itanium that uses timers to cover I/O
operations. Earliest VAX and Alpha versions needs to support V6.2. This application is
launched as a detached process, and needs to run 7 x 24.
The code uses ...
-
Does anyone know what time it is? SYS$GETTIM
I'm developing an application on VAX/Alpha/Itanium that uses timers to cover I/O
operations. Earliest VAX and Alpha versions needs to support V6.2. This application is
launched as a detached process, and needs to run 7 x 24.
The code uses SYS$GETTIM exclusively to get the current time, and timeout values are
added to that value, and then a timer is set (typically for 5-30 seconds).
What happens when daylight savings time kicks in (or out)? It's not clear from the
manuals that those timers will still fire at the right interval.
And what happens in V6.0-V6.2? Or is the behavior the same as V7.0 and later?
Yes, I know that someone doing a SET TIME will mess this all up. But I can't prevent
privileged idiots from really messing things up...
--Stan Quayle
Quayle Consulting Inc.
----------
Stanley F. Quayle, P.E. N8SQ Toll free: 1-888-I-LUV-VAX
8572 North Spring Ct., Pickerington, OH 43147 USA
stan-at-stanq-dot-com http://www.stanq.com/charon-vax.html
"OpenVMS, when downtime is not an option"
-
Re: Does anyone know what time it is? SYS$GETTIM
"Stanley F. Quayle" wrote in message
news:4905945A.20969.1A028ABB@infovax.stanq.com...
> I'm developing an application on VAX/Alpha/Itanium that uses timers to
> cover I/O
> operations. Earliest VAX and Alpha versions needs to support V6.2. This
> application is
> launched as a detached process, and needs to run 7 x 24.
>
> The code uses SYS$GETTIM exclusively to get the current time, and timeout
> values are
> added to that value, and then a timer is set (typically for 5-30 seconds).
>
> What happens when daylight savings time kicks in (or out)? It's not clear
> from the
> manuals that those timers will still fire at the right interval.
>
> And what happens in V6.0-V6.2? Or is the behavior the same as V7.0 and
> later?
>
> Yes, I know that someone doing a SET TIME will mess this all up. But I
> can't prevent
> privileged idiots from really messing things up...
>
It depends on whether you pass an absolute time or a delta time to
sys$setimr. If it's just before 2am and you set a timer for 2:30am, when
the time jumps to 3am your timer will fire (even though you just set it).
If you had passed a delta time of 30 minutes, the timer would fire 30
minutes later (and the time would be 3:30am).
I think it has always worked this way.
-
Re: Does anyone know what time it is? SYS$GETTIM
On 27 Oct 2008 at 12:21, John Vottero wrote:
> It depends on whether you pass an absolute time or a delta time to
> sys$setimr. If it's just before 2am and you set a timer for 2:30am, when
> the time jumps to 3am your timer will fire (even though you just set it).
> If you had passed a delta time of 30 minutes, the timer would fire 30
> minutes later (and the time would be 3:30am).
>
> I think it has always worked this way.
In later versions of VMS, the underlying clock is UTC, which doesn't change. But there
doesn't seem to be any documentation on whether GETTIM returns the UTC time or local
time.
Guess we'll just have to test it...
--Stan Quayle
Quayle Consulting Inc.
----------
Stanley F. Quayle, P.E. N8SQ Toll free: 1-888-I-LUV-VAX
8572 North Spring Ct., Pickerington, OH 43147 USA
stan-at-stanq-dot-com http://www.stanq.com/charon-vax.html
"OpenVMS, when downtime is not an option"
-
Re: Does anyone know what time it is? SYS$GETTIM
On 27 Oct, 14:13, "Stanley F. Quayle" wrote:
> I'm developing an application on VAX/Alpha/Itanium that uses timers to cover I/O
> operations. *Earliest VAX and Alpha versions needs to support V6.2. *This application is
> launched as a detached process, and needs to run 7 x 24.
>
> The code uses SYS$GETTIM exclusively to get the current time, and timeoutvalues are
> added to that value, and then a timer is set (typically for 5-30 seconds)..
>
> What happens when daylight savings time kicks in (or out)? *It's not clear from the
> manuals that those timers will still fire at the right interval.
>
> And what happens in V6.0-V6.2? *Or is the behavior the same as V7.0 andlater?
>
> Yes, I know that someone doing a SET TIME will mess this all up. *But Ican't prevent
> privileged idiots from really messing things up...
>
> --Stan Quayle
> Quayle Consulting Inc.
>
> ----------
> Stanley F. Quayle, P.E. N8SQ *Toll free: 1-888-I-LUV-VAX
> 8572 North Spring Ct., Pickerington, OH *43147 *USA
> stan-at-stanq-dot-com *http://www.stanq.com/charon-vax.html
> "OpenVMS, when downtime is not an option"
If its a absolute timer you set then it will finish at the time you
specify i.e if at midnight you set it for 02:00 then the clocks go
back it will be three hours before it goes off.
If its a relative timer you set then it will wait for as long as you
set irrespective of time changes. The TQE entries are adjusted to make
this happen. Read the big black book for details.