     >alist [ second total-time>> ] inv-sort-with ;
 
 : duration. ( duration -- )
-    duration>milliseconds >float "%9.1f" format-float write ;
+    1000 * >float "%9.1f" format-float write ;
 
 : percentage. ( num denom -- )
-    [ duration>seconds ] bi@ [ 100 * ] dip /f "%6.2f" format-float write ;
+    [ 100 * ] dip /f "%6.2f" format-float write ;
 
 DEFER: (profile.)
 

: unclip-callstack ( sample -- sample' callstack-top )
    clone 6 over [ unclip swap ] change-nth ;

: samples>time ( samples -- time )
    samples-per-second get-global / seconds ;

: total-time* ( profile-data -- n )
    [ total-sample-count ] map-sum samples>time ;

! (c)2011 Joe Groff bsd license
USING: accessors assocs combinators
combinators.short-circuit continuations fry generalizations
hashtables.identity io kernel kernel.private layouts locals
math math.parser math.parser.private math.statistics
