/** * Copyright (c): Uwe Schmidt, FH Wedel * * You may study, modify and distribute this source code * FOR NON-COMMERCIAL PURPOSES ONLY. * This copyright message has to remain unchanged. * * Note that this document is provided 'as is', * WITHOUT WARRANTY of any kind either expressed or implied. */ package tests.util; public abstract class Main implements Runnable { protected long start; protected Main() { start = System.currentTimeMillis(); } protected void startTime(String msg) { msg(msg); start = System.currentTimeMillis(); } protected void stopTime() { long dur = System.currentTimeMillis() - start; msg("time used: " + dur + " msec\n"); } protected void msg(String s) { System.out.println(s); } protected void nl() { msg(""); } }