简体   繁体   English

如何在 DXL 中计算执行时间

[英]How to calculate execution time in DXL

I'm trying to make a program in DXL (IBM DOORS) and I have a doubt.我正在尝试在 DXL (IBM DOORS) 中制作一个程序,但我有疑问。 I have several ideas about how to make the script, but I would like to know which one has the least cost in time.我对如何制作脚本有几个想法,但我想知道哪一个的时间成本最低。

For example (this isn't the real program that I want to do, but a triviality to exemplify what I ask), in the program below how can I know the time it takes me in seconds?例如(这不是我想要做的真正的程序,而是一个简单的例子来说明我问的问题),在下面的程序中,我怎么知道我需要几秒钟的时间?

Folder f = current Folder;

void ScanFolder(Folder f) {

    Item itm;

    for itm in f do {

        if (type(itm) == "Folder") {

            print "FOLDER: " fullName(itm) "\n";
            ScanFolder(folder(itm));

        }

        else if (type(itm) == "Formal") {

            print "MODULE: " fullName(itm) "\n";

        }

        else {

            ;

        }

    }

}

If seconds is detailed enough, you can use intOf (today()) as start and end time.如果 seconds 足够详细,您可以使用intOf (today())作为开始和结束时间。 In case you need millisecods, there's an undocumented perm int getTickCount_ ()如果您需要毫秒,有一个未记录的 perm int getTickCount_ ()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM