diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -177,24 +177,23 @@ operation as described below in section 4d, but using a 'start at' time instead of an offset time. There are two subtypes of 'start at' dates, namely "@YYYY-MM-DD -hh:mm:ss" and "^YYYY-MM-DD hh:mm:ss". For example, the 24th of -December, 2002, 8:30 PM would have to be specified as -FAKETIME="@2002-12-24 20:30:00". +hh:mm:ss" and "^YYYY-MM-DD hh:mm:ss". The date *must* be written as +indicated (see example below). -The 'at' and 'caret' specifications differ with respect to the dates -seen by spawned subprocesses: with @ all subprocesses "see" the faked -starting time, regardless of the time at which they were spawned; the -caret, instead, creates a single clock shared in the process -group. The caret requires the use of the "faketime" wrapper. +The 'at' and 'caret' specifications differ with respect to what +happens when subprocesses are spawned: with @ each subprocess "sees" +the same faked starting time, regardless of the time at which it was +spawned; the caret, instead, creates a single shared clock for the +process group. The caret requires the use of the "faketime" wrapper. -For example: +For example (24th of December, 2002, 8:30 PM) - faketime -f '@2008-12-24 08:15:42' /bin/bash -c 'date; sleep 2; date' + faketime -f '@2002-12-24 20:30:00' /bin/bash -c 'date; sleep 2; date' will print the same time twice, because each invocation of the "date" command sees its independent faked clock, while - faketime -f '^2008-12-24 08:15:42' /bin/bash -c 'date; sleep 2; date' + faketime -f '^2002-12-24 20:30:00' /bin/bash -c 'date; sleep 2; date' will show dates 2 seconds apart because the two processes share a single faked clock. |