473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

pausing system clock

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
3 2955
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Valiz | last post by:
Hi, I am updating system time with IRIG time source which sends irregular pulses as shown below 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not present) I need to update...
3
by: James Harriman | last post by:
Hi, I need to be able to measure a time interval in milliseconds on a windows machine. I have tried using time.clock() but it appears to measure time in seconds...Is there a way to measure time...
3
by: Graham | last post by:
How can I cause a python program to pause/suspend execution for a period of time? I am checking status of an external system and only want to check every second as opposed to my current which...
10
by: Partho Choudhury | last post by:
Hi all: I need to add a snippet which access the system time (upto atleast milliseconds) using ANSI std. C++. I cannot use MFC and Win32 APIs in my program for now for various reasons. Is there...
7
by: Charles Law | last post by:
My first thought was to call WorkerThread.Suspend but the help cautions against this (for good reason) because the caller has no control over where the thread actually stops, and it might have...
10
by: MLH | last post by:
I wish to give someone an A97 database they can install on their PC as a runtime application. I want them to click a button on a form (frmDocumentMyPC). I want to document as much useful...
12
by: jUrner | last post by:
Hello all I have the problem of how to calculate the resolution of the system clock. Its now two days of head sratching and still there is nothing more than these few lines on my huge white...
25
by: Kwebway Konongo | last post by:
Hi everyone, I'm developing an application in C; basically a linked list, with a series of "events" to be popped off, separated by a command to pause reading off the next event in the list. It has...
2
by: BLUE | last post by:
I would like to pause an application while the GUI display a Label saying "Logging in...". System.Timers System.Windows.Forms.Timer System.Threading.Timer System.Threading ==Thread.Sleep ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.