/Users/lyon/j4p/src/net/rmi/rmiSynth/LocalServer.java

1    package net.rmi.rmiSynth; 
2     
3    public class LocalServer { 
4     
5        public void hello() { 
6            System.out.println("Hello"); 
7        } 
8     
9        public String getHello() { 
10           return "Hello world"; 
11       } 
12    
13       public long getBenchMark() { 
14           long starttime, endtime; 
15           starttime = System.currentTimeMillis(); 
16           multiplyBench(10000000); 
17           endtime = System.currentTimeMillis(); 
18           return (endtime - starttime); 
19       } 
20    
21       public void multiplyBench(long range) { 
22           long i, product; 
23           int d1, d2; 
24           d1 = 2; 
25           d2 = 3; 
26           for (i = 0; i < range; i++) 
27               product = d1 * d2; 
28       } 
29   }