[Pydev-cvs] org.python.pydev.core/src/org/python/pydev/core/performanceeval Timer.java, 1.1, 1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2008-09-27 19:57:59
|
Update of /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/performanceeval In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19948/src/org/python/pydev/core/performanceeval Modified Files: Timer.java Log Message: Synching to latest changes: Pydev <ul> <li><strong>Editor</strong>: Cursor settings no longer overridden</li> <li><strong>Code-completion</strong>: If __all__ is defined with runtime elements (and not only in a single assign statement), it's ignored for code-completion purposes</li> <li><strong>Debugger</strong>: Pythonpath the same in debug and regular modes (sys.path[0] is the same directory as the file run)</li> <li><strong>Debugger</strong>: Persist choices done in the debugger when files from the debugger are not found</li> <li><strong>Interpreter config</strong>: "email" automatically added to the "forced builtins"</li> <li><strong>Parser</strong>: Correctly recognizing absolute import with 3 or more levels</li> <li><strong>Syntax check</strong>: Option to do only on active editor</li> </ul> Also: tabs changed for spaces Index: Timer.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev.core/src/org/python/pydev/core/performanceeval/Timer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Timer.java 1 Jun 2006 10:33:01 -0000 1.1 --- Timer.java 27 Sep 2008 19:57:36 -0000 1.2 *************** *** 6,38 **** public class Timer { ! private long start; ! public Timer(){ ! this.start = System.currentTimeMillis(); ! } ! public void printDiffMillis() { ! System.out.println("Time Elapsed (millis):"+getDiff()); ! } ! ! public void printDiff() { ! printDiff(null); ! } ! private long getDiff() { ! long old = this.start; ! long newStart = System.currentTimeMillis(); ! long diff = (newStart-old); ! start = newStart; ! return diff; ! } ! public void printDiff(String msg) { ! double secs = getDiff()/1000.0d; ! if(msg != null){ ! System.out.println("Time Elapsed for:"+msg+" (secs):"+secs); ! }else{ ! System.out.println("Time Elapsed (secs):"+secs); ! } ! } } --- 6,38 ---- public class Timer { ! private long start; ! public Timer(){ ! this.start = System.currentTimeMillis(); ! } ! public void printDiffMillis() { ! System.out.println("Time Elapsed (millis):"+getDiff()); ! } ! ! public void printDiff() { ! printDiff(null); ! } ! private long getDiff() { ! long old = this.start; ! long newStart = System.currentTimeMillis(); ! long diff = (newStart-old); ! start = newStart; ! return diff; ! } ! public void printDiff(String msg) { ! double secs = getDiff()/1000.0d; ! if(msg != null){ ! System.out.println("Time Elapsed for:"+msg+" (secs):"+secs); ! }else{ ! System.out.println("Time Elapsed (secs):"+secs); ! } ! } } |