Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 16a89bc

Browse files
committed
added timer py
1 parent faf2f29 commit 16a89bc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎python-scripts/timer.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python
2+
from timeit import default_timer as timer
3+
4+
start = timer()
5+
ctr = 0
6+
7+
while ctr < 100:
8+
ctr += 1
9+
print ("\n" + str(ctr))
10+
11+
end = timer()
12+
print("time to execute = " + str(end - start))

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /