Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dis70rt authored Sep 25, 2021
1 parent 0112e3c commit 11e3dd5
Showing 1 changed file with 54 additions and 9 deletions.
63 changes: 54 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,59 @@
# exetime 3.7

This module is for finding the execution time of a whole program
## Contents:
* [General Information](https://github.com/saikat0326/exetime#general-information)
* [Instruction](https://github.com/saikat0326/exetime#instruction)
* Example-1
* Example-2
* [Developer and Credits](https://github.com/saikat0326/exetime#developer-and-credits)

# General Information:
It uses process_time() built-in function in ***python 3.7*** or above.
More info on [Python Docs](https://docs.python.org/3/library/time.html#time.process_time_ns)

# Instruction:
As soon as you import the module,
__init__() gets excuted and it is the starting of the program,
>(Prefer to import exeTime above all imports)
---Write your code---

It uses process_time() built-in function in python 3.7 or above
More info on Docs : https://docs.python.org/3/library/time.html#time.process_time_ns
After finishing writing your code and successfully compilling,
call `exetime()` or `exetime_ms()` (At the end of everything)
>Use the `print()` for viewing the output
Instruction:
As soon as you import the module __init__() gets excuted and it is the starting of the program,\n
(Prefer to import exeTime above all imports)
### Example-1:
import exetime
# Your Other
# Imports here

# Write some code

print(exetime.exetime())

### Example-2:
import exetime
import time

sum = 0
for x in range(100000):
sum = sum + x
time.sleep(5)

print(exetime.exetime())

**Note:** the delay of `time.sleep(5)` won't be included, since it only calculate the process time by CPU

---Write your code---
# Developer and Credit
This module was developed by Saikat
* [Website](https://saikat.in)
* [Instagram](https://instagram.com/saikat._)
* [Twitter](https://twitter.com/SaikatDas_)

After finishing writing your code and successfully compilling,
call exetime() or exetime_ms() [At the end of everything]
(Use the print() for viewing the output)
External Credit:
* [StackOverFlow Question](https://stackoverflow.com/a/1557584/12404738)
* [Marc Maxmeister](https://stackoverflow.com/users/536538/marc-maxmeister)


0 comments on commit 11e3dd5

Please sign in to comment.