當前位置: 首頁>>代碼示例>>Java>>正文


Java Timing類代碼示例

本文整理匯總了Java中com.trollworks.toolkit.utility.Timing的典型用法代碼示例。如果您正苦於以下問題:Java Timing類的具體用法?Java Timing怎麽用?Java Timing使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Timing類屬於com.trollworks.toolkit.utility包,在下文中一共展示了Timing類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: noWindowsAreOpenAtStartup

import com.trollworks.toolkit.utility.Timing; //導入依賴的package包/類
@Override
public void noWindowsAreOpenAtStartup(boolean finalChance) {
	if (finalChance) {
		Timing timing = new Timing();
		TreeTestWindow win = new TreeTestWindow("Test 1 Drop Copy & Move", true); //$NON-NLS-1$
		win.setBounds(50, 50, 500, 500);
		win.setVisible(true);
		System.out.println("Tree 1 took " + timing); //$NON-NLS-1$
		win = new TreeTestWindow("Test 2 Drop Move Only", false); //$NON-NLS-1$
		win.setBounds(600, 50, 500, 500);
		win.setVisible(true);
		System.out.println("Tree 2 took " + timing); //$NON-NLS-1$

		OutlineTestWindow win2 = new OutlineTestWindow("Outline"); //$NON-NLS-1$
		win2.setBounds(50, 600, 500, 500);
		win2.setVisible(true);
		System.out.println("Outline took " + timing); //$NON-NLS-1$
	}
}
 
開發者ID:Ayutac,項目名稱:toolkit,代碼行數:20,代碼來源:TreeTester.java

示例2: main

import com.trollworks.toolkit.utility.Timing; //導入依賴的package包/類
/**
 * The main entry point for the character sheet.
 *
 * @param args Arguments to the program.
 */
public static void main(String[] args) {
    App.setup(GCS.class);
    Dice.setAssumedSideCount(6);
    CmdLine cmdLine = new CmdLine();
    cmdLine.addOptions(TEXT_OPTION, TEXT_TEMPLATE_OPTION, PDF_OPTION, PNG_OPTION, SIZE_OPTION, MARGIN_OPTION);
    cmdLine.processArguments(args);
    if (cmdLine.isOptionUsed(TEXT_OPTION) || cmdLine.isOptionUsed(PDF_OPTION) || cmdLine.isOptionUsed(PNG_OPTION)) {
        System.setProperty("java.awt.headless", Boolean.TRUE.toString()); //$NON-NLS-1$
        initialize();
        Timing timing = new Timing();
        System.out.println(BundleInfo.getDefault().getAppBanner());
        System.out.println();
        if (convert(cmdLine) < 1) {
            System.out.println(NO_FILES_TO_PROCESS);
            System.exit(1);
        }
        System.out.println(MessageFormat.format(FINISHED, timing));
        System.exit(0);
    } else {
        LaunchProxy.configure(cmdLine.getArgumentsAsFiles());
        if (GraphicsUtilities.areGraphicsSafeToUse()) {
            initialize();
            GCSApp.INSTANCE.startup(cmdLine);
        } else {
            System.err.println(GraphicsUtilities.getReasonForUnsafeGraphics());
            System.exit(1);
        }
    }
}
 
開發者ID:richardwilkes,項目名稱:gcs,代碼行數:35,代碼來源:GCS.java


注:本文中的com.trollworks.toolkit.utility.Timing類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。