Author: wmb Date: 2009-10-09 02:16:02 +0200 (Fri, 09 Oct 2009) New Revision: 1408
Modified: cpu/x86/pc/olpc/via/cstate.fth Log: Via C-state test - display sleep time in percent.
Modified: cpu/x86/pc/olpc/via/cstate.fth =================================================================== --- cpu/x86/pc/olpc/via/cstate.fth 2009-10-09 00:07:12 UTC (rev 1407) +++ cpu/x86/pc/olpc/via/cstate.fth 2009-10-09 00:16:02 UTC (rev 1408) @@ -55,16 +55,20 @@ ; : idling ( xt -- ) to do-idle - cursor-off + sleep-time off acpi-time@ start-time ! + + cursor-off begin green-letters (cr show-temperature d# 1024 idle-ms black-letters (cr show-temperature d# 1024 idle-ms key? until - acpi-time@ start-time @ - cursor-on - ." Slept " sleep-time @ .d ." of " .d ." ticks" cr + + sleep-time @ d# 1000 acpi-time@ start-time @ - */ ( %*10 ) + cr ." Slept " push-decimal <# u# [char] . hold u#s u#> pop-base type ." % of the time" cr + ['] default-idle-state to do-idle ; : .idling ( $ -- )