How do I stop time in a PC

All,

I want to stop time on my PC(win2k). That is whenever I call to get the
time the PC gives
me the same time. I don’t think it would be easy but I thought I would
ask.

Regards,
Aram Nahidipour

>I want to stop time on my PC(win2k). That is whenever I call to get the

time the PC gives
me the same time. I don’t think it would be easy but I thought I would
ask.

As a developer of OTHER apps and drivers, I’d hope the answer is it’s
impossible for you to really stop time. Have you considered how stopping
time may impact things? I’d be real interested in hearing why you think
stopping the real-time clock is an appropriate solution and what problem
you believe this solves? Reality is, time always moves forward, at a mostly
constant rate. The labeling of specific moments does sometimes get a bit
strange.

A driver can easily prevent scheduling, by raising the IRQL. Running
threads will then think time stopped for a bit, because they won’t get the
processor (on single processor systems).

As the performance counters often run off the internal processor timestamp
counter, stopping time means stopping the processor clock, which is a
viable form of power management. It sounds like you want the processor
clock to run, but things like the performance timer to be frozen? What is
you expectation on SMP systems, that ALL processors will not see time move
forward?

I believe there is an API to adjust the speed of time. This is used to skew
the clock to a new value (like leap second negative compensation). My fuzzy
memory is this applies to absolute time measurements, not interval time
measurements.

Perhaps you need to define exactly what you mean by “stopping time”.

  • Jan

Jan,

By “stopping time” I mean if any application(not the driver or OS)needs to
get the current time, it will get the same time(elapseTime=0). So as far as
the application goes, the time has stopped.
One way to do this is to intercept all time functions and return a fixed
time.

Regards,
Aram

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Jan Bottorff
Sent: Saturday, September 30, 2000 1:15 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I stop time in a PC

I want to stop time on my PC(win2k). That is whenever I call to get the
time the PC gives
me the same time. I don’t think it would be easy but I thought I would
ask.

As a developer of OTHER apps and drivers, I’d hope the answer is it’s
impossible for you to really stop time. Have you considered how stopping
time may impact things? I’d be real interested in hearing why you think
stopping the real-time clock is an appropriate solution and what problem
you believe this solves? Reality is, time always moves forward, at a mostly
constant rate. The labeling of specific moments does sometimes get a bit
strange.

A driver can easily prevent scheduling, by raising the IRQL. Running
threads will then think time stopped for a bit, because they won’t get the
processor (on single processor systems).

As the performance counters often run off the internal processor timestamp
counter, stopping time means stopping the processor clock, which is a
viable form of power management. It sounds like you want the processor
clock to run, but things like the performance timer to be frozen? What is
you expectation on SMP systems, that ALL processors will not see time move
forward?

I believe there is an API to adjust the speed of time. This is used to skew
the clock to a new value (like leap second negative compensation). My fuzzy
memory is this applies to absolute time measurements, not interval time
measurements.

Perhaps you need to define exactly what you mean by “stopping time”.

  • Jan

You are currently subscribed to ntdev as: xxxxx@nwlink.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

So, the next important question is “Why ?”

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Nahidipour [mailto:xxxxx@nwlink.com]
Sent: Saturday, September 30, 2000 2:33 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I stop time in a PC

Jan,

By “stopping time” I mean if any application(not the driver or OS)needs to
get the current time, it will get the same time(elapseTime=0). So as far as
the application goes, the time has stopped.
One way to do this is to intercept all time functions and return a fixed
time.

I need to understand a time variant application which I don’t have the
source code to.

Regards,
Aram

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Paul Bunn
Sent: Saturday, September 30, 2000 2:49 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I stop time in a PC

So, the next important question is “Why ?”

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----Original Message-----
From: Nahidipour [mailto:xxxxx@nwlink.com]
Sent: Saturday, September 30, 2000 2:33 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I stop time in a PC

Jan,

By “stopping time” I mean if any application(not the driver or OS)needs to
get the current time, it will get the same time(elapseTime=0). So as far as
the application goes, the time has stopped.
One way to do this is to intercept all time functions and return a fixed
time.


You are currently subscribed to ntdev as: xxxxx@nwlink.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

A technique often used in real-time and near real-time apps is to have a
“clock” program that takes a periodic scheduling interrupt of some kind and
maintains an application-specific time that all applications in the system
access instead of the built-in time. This would require application changes
to use this new time instead of the true system time. Another option would
be to somehow hook the time retrieval routines in the system libraries.
This may not be too easy though, since there are numerous ways to retrieve
time from Win32.

Greg

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Jan Bottorff
Sent: Saturday, September 30, 2000 3:15 PM
To: NT Developers Interest List
Subject: [ntdev] Re: How do I stop time in a PC

>I want to stop time on my PC(win2k). That is whenever I call to get the
>time the PC gives
>me the same time. I don’t think it would be easy but I thought I would
>ask.

As a developer of OTHER apps and drivers, I’d hope the answer is it’s
impossible for you to really stop time. Have you considered how stopping
time may impact things? I’d be real interested in hearing why you think
stopping the real-time clock is an appropriate solution and what problem
you believe this solves? Reality is, time always moves forward,
at a mostly
constant rate. The labeling of specific moments does sometimes get a bit
strange.

A driver can easily prevent scheduling, by raising the IRQL. Running
threads will then think time stopped for a bit, because they
won’t get the
processor (on single processor systems).

As the performance counters often run off the internal processor
timestamp
counter, stopping time means stopping the processor clock, which is a
viable form of power management. It sounds like you want the processor
clock to run, but things like the performance timer to be frozen? What is
you expectation on SMP systems, that ALL processors will not see
time move
forward?

I believe there is an API to adjust the speed of time. This is
used to skew
the clock to a new value (like leap second negative
compensation). My fuzzy
memory is this applies to absolute time measurements, not interval time
measurements.

Perhaps you need to define exactly what you mean by “stopping time”.

  • Jan

You are currently subscribed to ntdev as: xxxxx@pdq.net
To unsubscribe send a blank email to $subst(‘Email.Unsub’)