Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Obviously I'm talking about time in terms of the PC clock rather than real time.

We were testing an application we've developed at work by setting the clock forward and back to simulate different scenarios and I started thinking how useful it would be if you could adjust the rate(?) of the system clock with finer control. So you could make a minute pass in a second or a day pass in 30 seconds and watch how the program you're developing copes with changes in date and time.

Is there any such software available?

I'd be interested to hear if anyone knows of any software or hardware which can let you do some or all of the above.

share|improve this question
5  
Ask Doctor Who what he runs in the TARDIS. –  Rob Oct 4 '09 at 18:44
2  
Just a note - If this computer is on a domain, expect flakey dealing with network shares and anything else Kerberos related. Changing the time so that it doesn't match the PDC Emulator can wreak havoc on Kerberos tickets. –  MDMarra Oct 6 '09 at 15:05
    
@Rob, I bet it's gentoo. –  Phoshi Oct 6 '09 at 15:18
add comment

4 Answers 4

It's not necessarily going to speed up time, but it can be useful for debugging.

Nirsoft's RunAsDate

From the site:

RunAsDate is a small utility that allows you to run a program in the date and time that you specify. This utility doesn't change the current system date and time of your computer, but it only injects the date/time that you specify into the desired application. You can run multiple applications simultaneously, each application works with different date and time, while the real date/time of your system continues to run normally.

share|improve this answer
add comment

You could always script it. (Does CMD still support the DATE/TIME commands?)

Any program you'd end up using would probably work by resetting the time in small increments anyways. If you didn't need super-fine-grained control, a batch script (or perl:) could control those changes pretty easily.

Gotchas: NTP update services would need to be turned off to use this solution, so that the OS didn't keep resetting the clock back to whatever it's supposed to be.

share|improve this answer
    
On WinXP, CMD still supports both commands. –  Isxek Oct 4 '09 at 20:41
    
thx, i'm booted into ubuntu for the forseeable future and couldn't check. –  quack quixote Oct 4 '09 at 21:33
1  
I was looking for something a bit more analogue than that. Almost like a wheel on the front of the computer that you could turn to slow down and speed up the clock. –  tjrobinson Oct 5 '09 at 14:22
1  
@tjrobinson: for that you'll need to do some hardware hacking as well. sounds like a cool project tho. :) –  quack quixote Oct 5 '09 at 19:53
add comment

I spotted a reference to an old program called ASpeeder. I've no idea how it works, if it works, or if it's an ancient scam site. Try at your own risk. Hail Eris.

It is payware ($20). Take a look, and be sure to virus-check the download before you install.

A Speeder 2008.4 Features (from the website):

  • Change the speed of desktop games or online games
  • Control application speed and windows speed
  • Easy to use, just drag the track bar or press hotkey
  • From 1/32 times speed to 32 times system speed
  • From 1/256 times speed to 256 times Windows speed
  • The speed setting is locked automatically
  • Offer three kinds of methods to change speed

enter image description here

share|improve this answer
    
I use to have a program similar to this. I believe it was designed to simulate a slower CPU clock speed for running older programs (mostly games) which based their reaction time on the CPUs clock. The program I had didn't mess with the system date/time. –  Kenneth Cochran Oct 6 '09 at 15:10
    
sounds like exactly what this was designed for. but who knows what's under the Options tab, maybe affecting the system clock is selectable. –  quack quixote Oct 6 '09 at 15:18
add comment

On unix systems, libfaketime is the de facto standard solution for this problem in software. It performs a sort of man-in-the-middle operation between your application and the system's time library. The requests are passed through to the system, but the replies are modified as needed. It also modifies the results of stat() calls, so file modification times & c. are also modified.

The settings are made with environment variables, so you might have to learn about those if you're not already familiar with their workings.

libfaketime supports relative and absolute offsets, stopped and running time and speeding up or slowing down. I don't know about running backwards, though.

Note that the current version pretends seconds are the highest resolution of time there is, and passes sub-second parts of responses through to the application unmodified. Thus, if you slow down the clock to half speed, a sub-seconds aware program making very rapid time calls will experience the whole second twice after each other rather than once just taking twice as long. If the clock is stopped, this means the application sees a random time within the selected second.

Unfortunately, Github is down today, so the docs are unavailable right now, but that will probably be fixed soon.

Edit:

With Github back up I tried it, and found the code for speed change to be general enough that it works well with negative values or anything else accepted by atof().

However, a different issue became apparent: For speed change, a time origin is necessary in addition to the real current time and the desired time offset. This origin is set independently for subprocesses, so that (when running backwards at nominal speed) when the parent process has retracted one minute, a newly spawned subprocess will see the current time as two minutes later than the parent process does.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.