I am using WEKA jvm and trying to run generalized sequential pattern algorithm on my data. I want to get execution time in millisecond. How can I do it ?
Asked
Active
Viewed 667 times
-1
-
Try using Java code. – Has QUIT--Anony-Mousse Mar 21 '17 at 01:22
1 Answers
0
Firstly. this has nothing to do with weka. Remove that tag.
Put this at the beginning of your code
long startTime = Calendar.getInstance().getTimeInMillis();
and at the end of your program,
long endTime = Calendar.getInstance().getTimeInMillis();
long timeTook = endTime - startTime
System.out.println("time took in milliseconds="+timeTook);
System.out.println("time took in seconds="+timeTook/1000);
System class also has methods currentTimeMillis()
and nanoTime()
But keep that in mind, if you're taking input from users. More user waits to enter the input, more the time taken will be displayed.

Anurag Awasthi
- 238
- 2
- 13