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.

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
    
github.com/vi/timeskew –  Vi. Jan 24 '12 at 14:09

1 Answer 1

up vote 2 down vote accepted

Implemented myself (for Linux): https://github.com/vi/timeskew

share|improve this answer

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.