473,549 Members | 2,408 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2970
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.co m

"Carlos Lozano" <Ca**********@d iscussions.micr osoft.comwrote in message
news:A5******** *************** ***********@mic rosoft.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_NumberOfCa lls 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.co m

"Carlos Lozano" <Ca**********@d iscussions.micr osoft.comwrote in message
news:A5******** *************** ***********@mic rosoft.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_NumberOfCal ls 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_NumberOfCa lls 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.co m

"Carlos Lozano" <Ca**********@d iscussions.micr osoft.comwrote in message
news:A5******** *************** ***********@mic rosoft.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
4638
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 system time when I find a steady pulse or a series of 1's say for a span of 10-15 seconds. Is there a way to implement this in VB6? Thanks in advance....
3
6687
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 more precisely? Regards, James Harriman v38zy@unb.ca
3
2446
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 checks may times a secnod and hogs my cpu in the process!!! Thank you to anyone who can help. Graham Smith PeopleSoft Technical Team Leader
10
34365
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 something like this in ANSI C++ which allows access up to milliseconds. I know that time.h and CTime allow access up to the second level, but I need...
7
2672
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 a lock pending, for example. I want to be able to stop a thread temporarily, and then optionally resume it or stop it for good.
10
1992
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 information about the PC as possible, save the data in table(s) and print a nice report. I know how to run IPconfig and read its output into Access tables. ...
12
2913
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 sheet of paper stiring at me. Lame I know. import time
25
2269
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 been sometime since I last did C, and that was the first K&R version! Is there a command to pause an app for a period of time, as all the commands...
2
5244
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 Which one? In the last case Sleep must be applied to what(Application, this or what)?
0
7542
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7982
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7500
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7827
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5385
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5110
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3514
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1079
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.