pausing system clock

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have requirement to pause the system clock until a certain event (Win XP).
Then the clock will be resumed to the real time.

I think it can be done using core functions and/or redirecting the time/date
call to a temporary service routines, then redirect to the original.

I will appreciate any ideas to go in the right direction.

Carlos
 
Carlos,

I seriously doubt that this is possible. Why not just wait for the
event and then set the time? What is it that you are trying to do? Messing
with the system clock like this is generally a bad idea.
 
Hello Nicholas,

As always I welcome your comments and advice.

The requirement is to create an application launcher (App1) for WinXP that
will pass a date (parm1) to the launched application (App2) and a third
integer parameter (parm2). App2 will use that date value (second parameter)
as it were the output of any calls to a date() function (ie. system date).
Once the number of calls to date() has reached the value of parm2, the date
calls will return system date as normal.

cmd line: App1 App2 {Parm1} {Parm2}

So, the idea was to intercept the date() routine, count the number of calls,
and check if (int_NumberOfCalls > parm2) { return system_date() } else
{return parm1}

App2 is a black box. It calls the date several times and will get parm1 or
system date depending on parm2 to fill a table.

Carlos

Nicholas Paldino said:
Carlos,

I seriously doubt that this is possible. Why not just wait for the
event and then set the time? What is it that you are trying to do? Messing
with the system clock like this is generally a bad idea.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Carlos Lozano said:
I have requirement to pause the system clock until a certain event (Win
XP).
Then the clock will be resumed to the real time.

I think it can be done using core functions and/or redirecting the
time/date
call to a temporary service routines, then redirect to the original.

I will appreciate any ideas to go in the right direction.

Carlos
 
The other option is to pause the time until int_NumberOfCalls has been
reached, then resume normal clock.

Thank you.

Carlos Lozano said:
Hello Nicholas,

As always I welcome your comments and advice.

The requirement is to create an application launcher (App1) for WinXP that
will pass a date (parm1) to the launched application (App2) and a third
integer parameter (parm2). App2 will use that date value (second parameter)
as it were the output of any calls to a date() function (ie. system date).
Once the number of calls to date() has reached the value of parm2, the date
calls will return system date as normal.

cmd line: App1 App2 {Parm1} {Parm2}

So, the idea was to intercept the date() routine, count the number of calls,
and check if (int_NumberOfCalls > parm2) { return system_date() } else
{return parm1}

App2 is a black box. It calls the date several times and will get parm1 or
system date depending on parm2 to fill a table.

Carlos

Nicholas Paldino said:
Carlos,

I seriously doubt that this is possible. Why not just wait for the
event and then set the time? What is it that you are trying to do? Messing
with the system clock like this is generally a bad idea.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Carlos Lozano said:
I have requirement to pause the system clock until a certain event (Win
XP).
Then the clock will be resumed to the real time.

I think it can be done using core functions and/or redirecting the
time/date
call to a temporary service routines, then redirect to the original.

I will appreciate any ideas to go in the right direction.

Carlos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top