1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package net.sf.jour.rt.agent;
22
23 /***
24 * @author michaellif
25 *
26 * TODO To change the template for this generated type comment go to
27 * Window - Preferences - Java - Code Style - Code Templates
28 */
29 public class MethodExecutionTimeEvent
30
31 private String methodName;
32 private long executionTime;
33
34
35 public MethodExecutionTimeEvent(String methodName, long executionTime) {
36 this.methodName = methodName;
37 this.executionTime = executionTime;
38 if (executionTime > 1000) {
39 System.out.println("Call to method " + methodName
40 + " took " + executionTime + " ms.");
41 }
42 }
43
44 /***
45 * DOCUMENT ME!
46 *
47 * @return DOCUMENT ME!
48 */
49 public String getMethodName() {
50 return methodName;
51 }
52
53 /***
54 * DOCUMENT ME!
55 *
56 * @return DOCUMENT ME!
57 */
58 public long getExecutionTime() {
59 return executionTime;
60 }
61
62 }