summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorToni G <toni.giorgino@isib.cnr.it>2013-08-22 02:07:16 +0200
committerToni G <toni.giorgino@isib.cnr.it>2013-08-22 02:08:30 +0200
commitb4e3028494c0fa3dfc8bae5d59ae0522def02fe2 (patch)
tree9fca75f616f5c3a61f0209d2adf6d144e40eaca9 /README
parent982d90cbd277dc6670f507146e11070f9ac52cb3 (diff)
downloadlibfaketime-b4e3028494c0fa3dfc8bae5d59ae0522def02fe2.tar.gz
explanation in readme
Diffstat (limited to 'README')
-rw-r--r--README21
1 files changed, 10 insertions, 11 deletions
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.