Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/eXene/lib/protocol/xtime.sml
ViewVC logotype

Diff of /sml/trunk/src/eXene/lib/protocol/xtime.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1187, Wed Apr 17 01:56:13 2002 UTC revision 1188, Wed Apr 17 15:17:31 2002 UTC
# Line 29  Line 29 
29      fun binOp rator (XT t1, XT t2) = XT(rator(t1, t2))      fun binOp rator (XT t1, XT t2) = XT(rator(t1, t2))
30      fun cmpOp rator (XT t1, XT t2) = rator(t1, t2)      fun cmpOp rator (XT t1, XT t2) = rator(t1, t2)
31    
32  (** NOTE: the following works for small time values, but not for big ones!! **)      fun toReal (XT w) = let
33      fun toReal (XT w) = Real.fromInt(Word32.toInt w)            fun cvt w = if (w >= 0wx40000000)
34                    then cvt(w - 0wx40000000) + 1073741824.0
35                    else Real.fromInt(Word32.toInt w)
36              in
37                cvt w
38              end
39    
40      val (op +) = binOp Word32.+      val (op +) = binOp Word32.+
41      val (op -) = binOp Word32.-      val (op -) = binOp Word32.-

Legend:
Removed from v.1187  
changed lines
  Added in v.1188

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0