By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

pausing system clock

P: n/a
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
Aug 4 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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]
- mv*@spam.guard.caspershouse.com

"Carlos Lozano" <Ca**********@discussions.microsoft.comwrote in message
news:A5**********************************@microsof t.com...
>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

Aug 4 '06 #2

P: n/a
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Carlos Lozano" <Ca**********@discussions.microsoft.comwrote in message
news:A5**********************************@microsof t.com...
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


Aug 5 '06 #3

P: n/a
The other option is to pause the time until int_NumberOfCalls has been
reached, then resume normal clock.

Thank you.

"Carlos Lozano" wrote:
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Carlos Lozano" <Ca**********@discussions.microsoft.comwrote in message
news:A5**********************************@microsof t.com...
>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
Aug 5 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.