"One could not be a successful scientist without realizing that, in contrast to the popular conception supported by newspapers and mothers of scientists, a goodly number of scientists are not only narrow-minded and dull, but also just stupid." -- J. D. Watson
CpuProportion
This was one of those mostly-crazy ideas that occasionally turns up at about 2am.
It suddenly struck me to wonder whether the CPU meter on my task bar could be made to display any kind of graphs, patterns, etc... which obviously requires code capable of using up a specified proportion of your CPU time.
Hence this class. I could see it actually being useful -- you could, for example, limit a particular thread to using 50% of the CPU -- apart from one thing. In its current incarnation, if you're using less than the amount specified, it will waste it for you... good for making a CPU meter draw graphs, not so good for any useful purpose.
It works reasonably well, actually -- I was able to produce a few different waveforms on my CPU meter before getting bored with the whole thing.
Source: cpuproportion.tgz
Package: org.davidmorgan.experimental
Main: org.davidmorgan.experimental.TestCpuProportion
Copyright (C) 2002-2007 David Morgan -- last modified 18/11/2006 -- 2076 hits -- best viewed with any browser -- valid xhtml -- valid css

