Dear list,<br><br>It turns out that for a VM that has been running for a arbitrarily long time it&#39;s still easy to find the time of it&#39;s birth.<br><br>considder the following;<br><br>=================<br>time birth;
<br>now - (now /samp)::samp =&gt; time start;<br>if (start == birth) &lt;&lt;&lt;&quot;Yay&quot;&gt;&gt;&gt;;<br>=============================<br><br>*hits head*<br><br>So, it&#39;s possible after all to define objects of type time wthout using time after all; adding durations to a &quot;fresh&quot; time object will in fact do.
<br><br>Next up; a poor man&#39;s casting;<br>=============================<br>//demo<br>&lt;&lt;&lt;dtot(second)&gt;&gt;&gt;;<br>&lt;&lt;&lt;ttod(now)&gt;&gt;&gt;;<br><br>//the meat<br>//time to duration and dur to time by Kassen.
<br>//considered trivial once I thought of it<br>//no rights reserved<br><br>fun time dtot (dur input)<br>&nbsp;{<br>&nbsp;//duration to time<br>&nbsp;//probably leaks memory<br>&nbsp;time garbage;<br>&nbsp;input +=&gt; garbage;<br>&nbsp;return garbage;
<br>&nbsp;}<br><br><br>fun dur ttod (time input)<br>&nbsp;{<br>&nbsp;//time to duration<br>&nbsp;<br>&nbsp;//here we go again with the strong typing<br>&nbsp;return ( input/samp )::samp;<br>&nbsp;}<br><br>====================================<br><br>*hits head again*
<br><br>Cheers,<br>Kas.<br>