From: Kevin B. <kev...@bi...> - 2002-02-22 06:12:05
|
You're basically limited to currentTimeMillis if you must stay with pure Java (which Jython does). If you're willing to "go native", you can use the JVM profiler interfaces (JVMPI) to have the JVM measure times for you: http://www.javaworld.com/javaworld/javatips/jw-javatip92.html Gives a description of one way to do it. If you go native, you could also wrap any other OS calls desired... kb Eric Bieschke wrote: > I want to measure CPU time within my Jython code. With CPython I'd typically > use os.times(). I don't believe os.times() is supported within Jython > [correct me if I'm wrong]. > > My google searches have only yielded information about using > java.lang.System.currentTimeMillis() as a timing mechanism within Jython, > which provides wall clock time, not CPU time. > > Is there an equivalent call to os.times() from Jython? If not, what > approaches have people used to measure CPU time within Jython? > > - Eric Bieschke > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |