diff options
author | Balint Reczey <balint@balintreczey.hu> | 2013-08-27 12:30:56 +0200 |
---|---|---|
committer | Balint Reczey <balint@balintreczey.hu> | 2013-08-28 14:41:48 +0200 |
commit | 8bb28faa910c081d6aa289430c136b0c4c8ac462 (patch) | |
tree | c935ae027adc4129e7b9c6503ea44a4290e74a23 /README | |
parent | 7caed1a0c855438b92925a5ffcdb174d99645474 (diff) | |
download | faketime-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-- | README | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -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. |