From b4e3028494c0fa3dfc8bae5d59ae0522def02fe2 Mon Sep 17 00:00:00 2001 From: Toni G Date: Thu, 22 Aug 2013 02:07:16 +0200 Subject: explanation in readme --- README | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'README') diff --git a/README b/README index 4d31400..7620efc 100644 --- a/README +++ b/README @@ -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. -- cgit v1.2.1