Re: GDI+ clock, GDI+ layered windows, text rendering, etc.
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
PaulIA from AutoItScript forum wrote: http://www.autoitscript.com/forum/index.php?showtopic=48155 '.. >CPU before change was about 20%-25% (with other apps running) >after change CPU usage stayed about 6% but peaked about 20% every so >often (same apps running) Thanks for your help in resolving this problem. I believe the new code I just put out should get you down to an acceptable CPU utilization. ..' You can show the time distribution in func Draw as follows: Func Draw() local $msg = '', $Start, $Time $Start = TimerInit() CalcHand() $Time = TimerDiff($Start) $msg &= 'CalcHand = ' & $Time & @CrLf $Start = TimerInit() DrawTime() $Time = TimerDiff($Start) $msg &= 'DrawTime = ' & $Time & @CrLf $Start = TimerInit() DrawHour() $Time = TimerDiff($Start) $msg &= 'DrawHour = ' & $Time & @CrLf $Start = TimerInit() DrawMin () $Time = TimerDiff($Start) $msg &= 'DrawMin = ' & $Time & @CrLf $Start = TimerInit() DrawSec () $Time = TimerDiff($Start) $msg &= 'DrawSec = ' & $Time & @CrLf msgbox(0,'', $msg) EndFunc Result for me: 0.38 47,0 63,5 83,8 103,9 CPU usage - 20% Thus, functions Draw... are very raw and expansive! Valery