From d5cd7064f55df4b18a4d9fbf97cb7d57ea4c07df Mon Sep 17 00:00:00 2001 From: Balint Reczey Date: Mon, 19 Aug 2013 14:08:51 +0200 Subject: Use the same global clock for all processes spawned by faketime -f '... iN' In case the clock is set to advance with each faked time(), etc. call, the counter uses the same clock counter stored in shared memory and protected by a semaphore. --- man/faketime.1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'man') diff --git a/man/faketime.1 b/man/faketime.1 index 98c1b59..0d9323b 100644 --- a/man/faketime.1 +++ b/man/faketime.1 @@ -32,7 +32,9 @@ faketime 'last Friday 5 pm' /bin/date faketime '2008-12-24 08:15:42' /bin/date faketime -f '+2,5y x10,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' faketime -f '+2,5y x0,50' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' -faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do echo $SECONDS ; sleep 1 ; done' +faketime -f '+2,5y i2,0' /bin/bash -c 'while true; do date ; sleep 1 ; done' +In this single case all spawned processes will use the same global clock without restaring it at the start of each process. + (Please note that it depends on your locale settings whether . or , has to be used for fractional offsets) .fi .SH ADVANCED TIMESTAMP FORMAT -- cgit v1.2.3