⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timeutil.java

📁 JAVA在编译原理上的应用。
💻 JAVA
字号:
package lolo.test;import java.io.PrintStream;/** Used by all <tt>TypicalCompilerScannerBy...</tt> scanners to print a time in a human readable form. * * @author <a href="http://www.inf.uos.de/bernd" target="_blank">Bernd K&uuml;hl</a>           (<a href="mailto:bernd@informatik.uni-osnabrueck.de">bernd@informatik.uni-osnabrueck.de</a>) */public class TimeUtil {    /** Used by all <tt>TypicalCompilerScannerBy...</tt> scanners to print a time in a human readable form.     *     * @param message a messahe which is printed before the time is printed.     * @param ms the time to print.     * @param out all the ouput is written to this stream.     */    public static void printMilliSecons(String message, long ms, PrintStream out) {        out.print(message+ms+"/");        long hours = ms / 3600000; // 1000 * 60 * 60 is a hour        ms %= 3600000;        long minutes = ms / 60000; // 1000 * 60 is a minute        ms %= 60000;        long seconds = ms / 1000;  // 1000 is a second        ms %= 1000;        out.println(hours+":"+minutes+":"+seconds+"."+ms);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -