This utility helps you run a program on Linux with the clock running more slowly or quickly than usual.
Build:
cd slower
make
You should get file libslower.so
.
Run a program (take DOSBox as the example):
SLOWER_FACTOR=2 LD_PRELOAD=/path/to/libslower.so dosbox
Then have fun.
You can adjust the value of SLOWER_FACTOR
to achieve different ratios.
Values between 0.01
and 100
(inclusive) are accepted.
The larger the value, the slower the clock (as seen by the deceived application) runs.
You can also make install
and use slower.sh
instead:
/path/to/slower.sh -f 2 dosbox
This program hacks glibc time functions to deceive applications of the real time.
Currently hacked interfaces:
TODO:
- Sleep functions:
sleep
,usleep
,nanosleep
,clock_nanosleep
- File descriptor polling functions:
select
,pselect
,poll
,ppoll
,epoll_wait
,epoll_pwait
- Timer functions: TBA
- Timeout related: TBA
syscall
- Others?