From aef788c795bb4bc81239a51df284127e65517d8f Mon Sep 17 00:00:00 2001 From: Wolfgang Hommel Date: Sun, 1 Sep 2013 16:04:21 +0200 Subject: Revert "merged rbalint's pr27" This reverts commit 5283614bec09c856ca0e71174ff9538ba1e8dae1, reversing changes made to 4ecef4db08c23d00fd66371970289c79acc2481b. --- README | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'README') diff --git a/README b/README index 05fdafa..c726c35 100644 --- a/README +++ b/README @@ -19,6 +19,7 @@ Content of this file: g) Using the "faketime" wrapper script h) "Limiting" libfaketime i) Spawning an external process + j) Saving timestamps to file, loading them from file 5. License 6. Contact @@ -424,11 +425,31 @@ This will run the "echo" command with the given parameter during the first time-related system function call that "myprogram" performs after running for 5 seconds. +4j) Saving timestamps to file, loading them from file +-------------------------------- + +Faketime can save faked timestamps to a file specified by FAKETIME_SAVE_FILE +environment variable. It can also use the file specified by FAKETIME_LOAD_FILE +to replay timestamps from it. After consuming the whole file faketime returns +to using the rule set in FAKETIME variable, but the timestamp processes will +start counting from will be the last timestamp in the file. + +The file stores each timestamp in a stream of saved_timestamp structs +without any metadata or padding: + +/** Storage format for timestamps written to file. Big endian.*/ +struct saved_timestamp { + int64_t sec; + uint64_t nsec; +}; + + +Faketime needs to be run using the faketime wrapper to use the files. 5. License ---------- -FTPL has been released under the GNU Public License, GPL. Please see the +FTPL has been released under the GNU Public License, GPL. Please see xthe included COPYING file. -- cgit v1.2.1