Skip to content

pc/time-warp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

time-warp runs a process with a time offset by intercepting system calls to gettimeofday. Handy for testing/debugging, avoiding stupid restrictions in software, etc.

To compile:
gcc -dynamiclib -o time-interpose.dylib time-interpose.c

Examples:
./time-warp -o +1M cal => Calendar for a month hence
./time-warp -o -12d 'date +%s' => Unix timestamp for this time 12 days ago 
./time-warp -s 0 date => 'Thu  1 Jan 1970 01:00:00'
./time-warp -o -2w /Applications/iCal.app/Contents/MacOS/iCal => iCal, thinking it's two weeks ago

Offset syntax [+-]N[smhdM], for seconds, minutes, days, hours, days, months respectively.

Author: [email protected]
Released into public domain

About

intercepts calls to gettimeofday()

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages