1.H 1 warp
2.B warp
3executes a dynamically linked command in a different time frame.
4It intercepts time related system calls and modifies the times seen by
5the command using the formula:
6.EX
7time' = time + warp + (time - base) * (factor - 1)
8.EE
9where:
10.BL
11.LI
12.I time'
13The logical system time seen by the command process.
14.LI
15.I time
16The physical system time.
17.LI
18.I warp
19A fixed offset from the physical system time
20(i.e., the warp.)
21.LI
22.I base
23The physical system time when
24.B warp
25was first applied to the process or any ancestor process.
26.LI
27.I factor
28The rate of logical time change with respect to the physical clock
29(i.e., the warp factor.)
30.LE
31.IR warp ,
32.IR base ,
33and
34.I factor
35are inherited by children of warped processes so that a child process
36is warped in the same time frame as its parent.
37Time progresses for warped processes at the rate of
38.I factor
39times the physical system clock.
40Any files created by a warped process
41will appear to be in the warped logical time frame
42for that process but will appear in physical system time frame
43for non-warped processes.
44.P
45Statically-linked, set-uid or set-gid commands are not warped.
46.H 2 Interface
47.B warp
48[
49.B \-b
50.I base
51] [
52.B \-f
53.I factor
54] [
55.B \-n
56] [
57.B \-t
58]
59.I date
60[
61.I command
62[
63.I arg
64\&...
65] ]
66.P
67The components of the warp formula are set as follows:
68the warp offset
69.I warp
70is
71.IR date-now ,
72.I base
73is
74.I date
75by default,
76and
77.I factor
78is 1 by default.
79.P
80Command argument date specifications support common conventions:
81.EX
82yesterday
83next week
8450 days
852000-02-28/00:00
86feb 28 2000
87.EE
88Absolute seconds since the epoch, a.k.a.
89.B time_t
90values, are represented by
91.BI # seconds.
92.P
93The
94.B \-n
95option shows how
96.I command
97would be executed without actually executing it.
98The
99.B \-t
100option traces each intercepted system call.
101.P
102.B warp
103executes
104.I command
105with optional
106.IR args ,
107or
108.B $SHELL
109if
110.I command
111is omitted.
112.H 2 Examples
113.EX
114$ date -f %Y-%m-%d/%H:%M
1151998-03-11/13:41
116$ warp 2000-02-29/12:30:30 date -f %Y-%m-%d/%H:%M
1172000-02-29/12:30
118$ date -f %Y-%m-%d/%H:%M
1191998-03-11/13:44
120$ warp +57060970 date
1212000-01-01/00:00
122
123# get a shell where 1 logical day passes for each physical second
124$ PS1='(warp) ' warp -f $(60*60*24) 2000-02-29/12:30:30
125(warp) date -f %Y-%m-%d/%H:%M
1262000-03-07/18:58
127(warp) sleep 1
128(warp) date -f %Y-%m-%d/%H:%M
1292000-03-19/18:58
130.EE
131