Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Soeren Sonnenburg
committed
Dec 5, 2011
1 parent
d320074
commit 77c55d7
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import time | ||
from modshogun import Time | ||
|
||
parameter_list = [[1]] | ||
def library_time(sleep_secs): | ||
# measure wall clock time difference | ||
t=Time() | ||
time.sleep(1) | ||
diff=t.cur_time_diff() | ||
|
||
# measure wall clock time difference | ||
t=Time() | ||
time.sleep(1) | ||
diff=t.cur_time_diff() | ||
# measure CPU time required | ||
cpu_diff=t.cur_runtime_diff_sec() | ||
|
||
# measure CPU time required | ||
# return results as integers to enable testing | ||
return round(diff),round(cpu_diff) | ||
|
||
cpu_diff=t.cur_runtime_diff_sec() | ||
if __name__=='__main__': | ||
print 'Time' | ||
library_time(*parameter_list[0]) |