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.

link|improve this question

64% accept rate
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 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 at 13:39
Oh, that's yet another matter. Those typically run off CLOCK_MONOTONIC, not CLOCK_REALTIME. – MSalters Jan 24 at 13:49
Yes, I noticed (my hack overrides only CLOCK_MONOTONIC and gettimeofday). – Vi. Jan 24 at 13:51
github.com/vi/timeskew – Vi. Jan 24 at 14:09
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.