I'm trying to make a program in DXL (IBM DOORS) and I have a doubt. 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 {
;
}
}
}
CodePudding user response:
If seconds is detailed enough, you can use intOf (today())
as start and end time. In case you need millisecods, there's an undocumented perm int getTickCount_ ()