KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SidCacheTest


1 import jcifs.smb.*;
2
3 public class SidCacheTest {
4
5     public static void main( String JavaDoc[] argv ) throws Exception JavaDoc {
6         long t1, t2, t3;
7         SmbFile file;
8         ACE[] security;
9         int ai;
10
11         file = new SmbFile(argv[0]);
12         t1 = System.currentTimeMillis();
13         security = file.getSecurity(true);
14         t2 = System.currentTimeMillis();
15         security = file.getSecurity(true);
16         t3 = System.currentTimeMillis();
17
18         System.out.println("dt1=" + (t2 - t1) + ",dt2=" + (t3 - t2) + " " + ((t2 - t1) / (t3 - t2)) + "x increase");
19     }
20 }
21
Popular Tags