Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a program/library that allows to override time flow in other processes?

Expecting it to override clock_gettime, gettimeofday, alarm and other functions that report time or use timeout using LD_PRELOAD and allows user to change coefficient between real time and virtual time on the fly.

share|improve this question
If you'd want to do so for a whole machine, the easy solution is to create a fake NTP server (not synchronized) and give it a very high drift value. – MSalters Jan 24 '12 at 13:32
No, it's mostly to influence things like games (slowdown or accelerate them). Already implemented simple version, wondering may be there is normal version somewhere. – Vi. Jan 24 '12 at 13:39
Oh, that's yet another matter. Those typically run off CLOCK_MONOTONIC, not CLOCK_REALTIME. – MSalters Jan 24 '12 at 13:49
Yes, I noticed (my hack overrides only CLOCK_MONOTONIC and gettimeofday). – Vi. Jan 24 '12 at 13:51 – Vi. Jan 24 '12 at 14:09
up vote 2 down vote accepted

Implemented myself (for Linux):

share|improve this answer

Your Answer


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.