import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
public class durasi {
public static void main(String[] args) throws IOException, Exception {
//Mencatat waktu awal proses
long waktuMulai= System.currentTimeMillis();
//Proses membaca daftar file di lokasi folder temp Java
String curDir = System.getProperty("java.io.tmpdir");
File dir = new File(curDir);
String[] entriFolder = dir.list();
if (entriFolder != null) {
for (int i=0; i
String namaFile = entriFolder[i];
System.out.println(namaFile);
}
}
//Akhir proses
//Mencatat waktu akhir proses
long waktuSelesai = System.currentTimeMillis();
//Menghitung durasi dalam detik dan
//mencetak dengan format ##0.000000
double newRunTime = (double)(waktuSelesai - waktuMulai) / 1000;
DecimalFormat runtimeDF = new DecimalFormat("##0.000000");
System.out.println("Durasi eksekusi : " +
runtimeDF.format(newRunTime) +
" detik");
}
}
Hasil Compile :
1317AD1.dmp
5a18_appcompat.txt
7zS55.tmp
AdobeARM.log
AdobeARM_NotLocked.log
AdobeSFX.log
alm.log
amt.log
Arabic.bin
AUCHECK_CORE.txt
AUCHECK_PARSER.txt
avg-02b17e30-6e52-4a6e-a858-e57cf2e2bd06.tmp.mht
avg-1d0e7b7d-1dfd-4a67-9476-d22bffd34e08.tmp.mht
avg-9dc5b14c-30c9-4640-a75a-bd0d777f0460.tmp.mht
avg-b8e0541a-cbd1-471e-96f9-c10bbdf20a6c.tmp.mht
bassmod.dll
be29e7f1-71ae-4703-50cb-1d52be512f51
bitrock_installer.log
chrome_installer.log
connect_result.log
Cookies
Czech.bin
Danish.bin
Dutch.bin
English.bin
etilqs_oSKpuZffQgB0jvb3Bgsi
etilqs_uohSMGniAoM8UWsa0Lbh
Finnish.bin
French.bin
German.bin
Greek.bin
Hebrew.bin
History
hsperfdata_Clark_Arik
Hungarian.bin
IECC8.tmp
install-postgresql.log
isp2C.tmp
Italian.bin
Japanese.bin
jarfscacheClark_Arik
JAUReg.log
java_install.log
java_install_reg.log
jusched.log
Korean.bin
MSI3eb3d.LOG
msohtmlclip
msohtmlclip1
Norwegian.bin
output1304465952250
output1304481299062
output1304556627765
output1304622531343
output1304625510968
output1304625585000
output1304625617046
output1304643708515
output1304643738781
output1304645046875
output1304645138812
output1304645156250
output1304645269437
output1304645293953
output1304645331546
output1304645349187
output1304645464593
output1304645595062
output1304645676968
output1304646601218
output1304646826234
output1304646958500
output1304647198781
output1304647246765
output1304647361390
output1304647378187
output1304725679359
output1304733541265
output1304735672031
output1304740405812x
output1304797920531
output1304801087843
output1304851521535
output1304851543254
output1304889597703
output1304890099468
output1304942152312
output1304942975625
output1304943001453
output1304944635609
output1304944723500
output1304946262343
output1304947285937
output1304948556156
output1304949841609
output1304950098562
output1304950621109
output1304950648796
output1304950719234
output1304950763390
output1304950776562
output1304950798125
output1304951924890
output1304951986406
output1304952019296
output1304952123468
output1304952219781
output1304952246765
output1304953484500
output1304953616843
output1304953895046
output1304954001437
output1304954490843
output1304954568562
output1304954588828
output1304954675687
output1304955974453
output1304955988531
output1304956128281
output1304956198875
output1304956238359
output1304956376734
output1304956483875
output1304956649609
output1304956670468
output1304956688515
output1304956705671
output1304956997187
output1304958108593
output1304958301218
output1304958337500
output1304958474828
output1304958552109
output1304958631484
output1304960074781
output1304960334875
output1304960458078
output1304960611781
output1304960628750
output1304960670062
output1304960966796
output1304961147031
output1304961450093
output1304961973468
plugtmp
plugtmp-1
plugtmp-2
plugtmp-3
Polish.bin
Portuguese(Brazil).bin
Portuguese.bin
radFEC47.tmp
Russian.bin
set28.tmp
SetupExe(201104302331573B4).log
SimChin.bin
Spanish.bin
SWEDISH.bin
Temporary Internet Files
Thai.bin
TradChin.bin
Turkish.bin
vga10
vga10.tmp
vga1E.tmp
_is1.exe
_is2.exe
_is3.exe
_is4.exe
_is93.exe
_PASFX303
{045CFB2B-65A3-49C9-BABC-E4452254C7AF}background.png
{045CFB2B-65A3-49C9-BABC-E4452254C7AF}Titan.ico
{12AF48F9-3A73-4CE8-B892-2FBC5E0878CF}
{37538BE1-10C3-4767-9191-9107E12255B2}
{762E17C8-C547-4B10-B053-F329F39A0D80}bridge.ico
{809B9E96-BDD7-4026-9EBF-7DFF088EDD6E}
{AA38C219-384B-4652-B164-1A04FFCD2537}
{BCD30B43-9083-4441-9284-E528A1285042}background.png
{BCD30B43-9083-4441-9284-E528A1285042}Setup.ico
{BE9B4EC6-BA3C-4839-8BEE-CE97043DF399}
{E469E805-E012-4A29-A536-99AE33FE0C6D}estk_ribs_bgd.png
~DF1A30.tmp
~DF2590.tmp
~DF29F9.tmp
~DF483D.tmp
~DF4B5D.tmp
~DF53A4.tmp
~DF5AD0.tmp
~DF5FE2.tmp
~DF62E7.tmp
~DF640F.tmp
~DF75EA.tmp
~DF8F6F.tmp
~DF9B29.tmp
~DFBCB.tmp
~DFD5D2.tmp
~DFED0C.tmp
~DFF24C.tmp
~DFFBDA.tmp
~sisRslt
Durasi eksekusi : 0.031000 detik
Tidak ada komentar:
Posting Komentar