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/branches/idlbasis-devel/src/MLRISC/control/mlrisc-timing.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/control/mlrisc-timing.sml

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

revision 1232, Tue Jun 4 21:11:15 2002 UTC revision 1233, Wed Jun 5 21:47:29 2002 UTC
# Line 14  Line 14 
14    
15     fun timePhase name f =     fun timePhase name f =
16     let val timing = MLRiscControl.timing name     let val timing = MLRiscControl.timing name
17         val { gc, usr, sys } = !timing         val { usr, sys } = !timing
18         fun run x =         fun run x =
19         let val timer = Timer.startCPUTimer()         let val timer = Timer.startCPUTimer()
20             fun update timer =             fun update timer =
21             let val {gc=gc',usr=usr',sys=sys'} = Timer.checkCPUTimer timer             let val {usr=usr',sys=sys'} = Timer.checkCPUTimer timer
22             in  timing := {gc=Time.+(gc,gc'),             in  timing := {usr=Time.+(usr,usr'),
                           usr=Time.+(usr,usr'),  
23                            sys=Time.+(sys,sys')}                            sys=Time.+(sys,sys')}
24             end             end
25             val y = f x handle e => (update timer; raise e)             val y = f x handle e => (update timer; raise e)

Legend:
Removed from v.1232  
changed lines
  Added in v.1233

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