Hacker Newsnew | comments | show | ask | jobs | submitlogin
Fluxcapacitor: spoof Posix time functions (github.com)
55 points by luu 506 days ago | comments

0x0 506 days ago | link

Reminds me about the "Subterfugue"[1] project I read about way back when.

Neat idea anyways!

[1] http://subterfugue.org/

Edit: Funnily enough, there's a "TimeWarp" example at the bottom of http://subterfugue.org/screenshot.html


majke 506 days ago | link

Cool project! I can't think of any practical usage thought. I guess nowadays it's much easier to just spawn a VM.


seanlinmt 505 days ago | link

For cheating in games? :)


jonty 506 days ago | link

See also libfaketime, which does all this and more besides: https://github.com/wolfcw/libfaketime


majke 506 days ago | link

libfaketime is very cool, but I think it does something different. It focuses on, well, faking time. Fluxcapacitor makes blocking syscalls exit immediately, faking time is a necessary side effect.

For example the docs of libfaketime say:

   LD_PRELOAD=./libfaketime.so.1 FAKETIME="+1,5y x10,0" \
   /bin/bash -c 'while true; do echo $SECONDS ; sleep 1 ; done'

   For each second that the endless loop sleeps, the
   executed bash shell will think that 10 seconds have passed
While with fluxcapacitor the sleep will exit immediately, not after 1s:

  $ time ./fluxcapacitor --libpath=. -- \
         bash -c 'for i in 1 2 3 4 5 ; do sleep 1; done'
  real    0m0.279s


StefanKarpinski 505 days ago | link

Especially useful for testing network protocol interactions faster than you could if you had to wait for real time to pass. Cool stuff.


Pirate-of-SV 506 days ago | link

Could be useful, too bad the name isn't that good.

Reminds me of the Delorean python package someone showed HN a while ago http://news.ycombinator.com/item?id=5104889.


chjj 506 days ago | link

A library referencing a favorite movie from my childhood automatically has points for the name. On that note, it could be called the_land_before_timeofday() for all I care.


mgurlitz 506 days ago | link

If it's useful to you why would you care what it's called.


Guidelines | FAQ | Lists | Bookmarklet | DMCA | News News | Bugs and Feature Requests | Y Combinator | Apply | Library | Contact