Mercurial > hg > ishara
annotate arrows/atime.m @ 2:7357e1dc2ad6
Simplified scheduler library with new schedule representation.
author | samer |
---|---|
date | Sat, 22 Dec 2012 16:17:51 +0000 |
parents | 672052bd81f8 |
children |
rev | line source |
---|---|
samer@0 | 1 % atime - Arrow that counts time starting from zero |
samer@0 | 2 % |
samer@0 | 3 % atime :: arrow({},{[1]},pair(empty,real)). |
samer@0 | 4 % atime :: DT:real -> arrow({},{[1]},pair(empty,real)). |
samer@0 | 5 % |
samer@0 | 6 % If no parameters are supplied, time increases by 1 each iteration. |
samer@0 | 7 % If one parameter DT is supplied, time increases by DT each iteration. |
samer@0 | 8 function a=atime(dt) |
samer@0 | 9 if nargin<1, dt=1; end |
samer@0 | 10 a=const(dt) * integrate(0); |
samer@0 | 11 end |
samer@0 | 12 |
samer@0 | 13 |