Hi,<br><br>Pretty dumb question I know, but..how to I display fractions of a second from a datediff?<br><br>ie:<br><br>main = do starttime &lt;- gettime<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- do something here that takes a few seconds<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; endtime &lt;- gettime
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let timediff = diffClockTimes endtime starttime<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; let timediffstring = show( tdSec timediff) ++ &quot; &quot; ++ show( realToFrac(tdPicosec timediff) / 1000000000 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; putStrLn( show(timediffstring) )
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ()<br><br>tdPicosec is negative???&nbsp;&nbsp; ... but sometimes it is positive... so it&#39;s really unclear what the appropriate way to handle this is!<br><br>Example outputs:<br>&quot;1 -62.0&quot;<br>&quot;0 
921.0&quot;<br><br>... it could be that the time in seconds in the second example is &quot;0.921&quot;, but for the first, is it &quot;1.062&quot; (adding the absolute milliseconds) or is it &quot;0.938&quot; (adding the negative milliseconds)?
<br><br>Tried to figure this out by generating timeDiffs myself then normalizing them, but this doesnt seem to do anything useful ;-) :<br><br>Prelude&gt; normalizeTimeDiff $ TimeDiff 0 0 0 0 0 0 1000000000000000000000000000000
<br>0000<br>TimeDiff {tdYear = 0, tdMonth = 0, tdDay = 0, tdHour = 0, tdMin = 0, tdSec = 0,<br>tdPicosec = 10000000000000000000000000000000000}<br><br>