Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I want to run an interactive simulation and have time pass at 12x real time. There is more than one solution to this, but is there a way to make the server clock run 12x faster?

share|improve this question
Which server OS are we talking about here? – RainyRat Nov 25 '09 at 20:36
Linux - current server is Ubuntu Hardy – user19196 Nov 25 '09 at 21:13
up vote 2 down vote accepted

Related question here (although Java-based). Even if you could speed the system clock up you'd break various of things (logging, timestamps on files, time-based kernel stuff to name but three) so it would seem better if your code could be made independent of "real" time.

Perhaps you could invent a new unit of time, equal to 1/12 of a second, and code your app in terms of that?

share|improve this answer

I suppose a script that changes the clock (starting waaaay back) and every second adds +12 seconds won't be good, will it? Somewhat I suspect the application is not using gettimeofday, but has an internal counter and timers. What simulation is that?

share|improve this answer
It will be a django system with people trading with each other. Can fudge it, but just wondering if it's possible to make the server solve the problem. – user19196 Nov 25 '09 at 21:12
Must admit no familiarity with Django trading systems :) I suspect it would not help, since it involves other peers (do you plan to adjust their clock as well?). Again, sorry for not being of much help - best thing would be tweaking the simulation for that purpose, assuming it's possible at all. – lorenzog Nov 25 '09 at 22:08
It does seem possible to tweek the clock - see adjtime - but maybe not advisable! – user19196 Nov 26 '09 at 10:19

Try adjtime

share|improve this answer
This looks fun and will play with it - but am heading advice of answer above that warns of all the things I'll screw up if I mess with the click. Still if I use an new Amazon instance for each test that wouldn't matter.... Thanks for finding this. – user19196 Nov 26 '09 at 10:18
adjtime is not that helpful in your case, because it applies its changes over a long period of time. It's more suited to sync'ing the system clock to an external time source. – slowpoison Oct 3 '13 at 22:55

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.