01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: AbstractTest.java,v 1.1 2001/12/18 10:31:30 per_nyfelt Exp $
08:
09: package org.ozoneDB.DxLib.test;
10:
11: import java.lang.*;
12: import java.util.*;
13: import org.ozoneDB.DxLib.*;
14:
15: /**
16: */
17: class AbstractTest extends Object {
18:
19: long start;
20: long stop;
21:
22: /**
23: */
24: public void startTimer(String className, String testName) {
25: className = className.substring(className.lastIndexOf(".") + 1);
26: System.out.print(testName + ":" + className + " - ");
27: System.out.flush();
28:
29: start = System.currentTimeMillis();
30: }
31:
32: /**
33: */
34: public void stopTimer() {
35: stop = System.currentTimeMillis();
36: printTime();
37: }
38:
39: /**
40: */
41: public void printTime() {
42: System.out.println("\t zeit: " + (stop - start) + " msec");
43: }
44:
45: /**
46: */
47: public void error() {
48: throw new RuntimeException("error");
49: }
50: }
|