summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorBalint Reczey <balint@balintreczey.hu>2013-08-27 12:30:56 +0200
committerBalint Reczey <balint@balintreczey.hu>2013-08-28 14:41:48 +0200
commit8bb28faa910c081d6aa289430c136b0c4c8ac462 (patch)
treec935ae027adc4129e7b9c6503ea44a4290e74a23 /README
parent7caed1a0c855438b92925a5ffcdb174d99645474 (diff)
downloadfaketime-ng-8bb28faa910c081d6aa289430c136b0c4c8ac462.tar.gz
Save faked timestamps to file, load faked timestamps from file
The files can be set using FAKETIME_SAVE_FILE and FAKETIME_LOAD_FILE environment variables respectively.
Diffstat (limited to 'README')
-rw-r--r--README23
1 files changed, 22 insertions, 1 deletions
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.