Metadata-Version: 2.4
Name: timifypy
Version: 0.1.1
Summary: A tiny and simple Python timer/stopwatch utility.
Author-email: Ajay Antony Joseph <ajayjoseph24@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/ajayjoseph13/timifypy
Project-URL: Documentation, https://github.com/ajayjoseph13/timifypy#readme
Project-URL: Source, https://github.com/ajayjoseph13/timifypy
Keywords: timer,stopwatch,benchmark,performance,timing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Dynamic: license-file

# timifypy

A tiny, clean, and useful timing utility for Python.

Measure execution time effortlessly with a context manager or a manual stopwatch.

---

## 🚀 Installation

```bash
pip install timifypy


## Advanced Usage

### ⏱ Manual Stopwatch
```python
from timifypy import Stopwatch
sw = Stopwatch()

sw.start()
# some heavy computation
sum(range(1000000))
sw.stop()

print(sw)          # e.g., <Stopwatch 12.34 ms>
print(sw.elapsed)  # raw seconds


##Basic Usage
from timifypy import Stopwatch

sw = Stopwatch()

sw.start()
# some heavy computation
sum(range(1000000))
sw.stop()

print(sw)          # e.g., <Stopwatch 12.34 ms>
print(sw.elapsed)  # raw seconds


#Context Manager
from timifypy import timer

with timer("example computation"):
    sum(range(1000000))


##Context Manager with Logging
from timifypy import timer

with timer("load data", log_file="timings.log"):
    sum(range(1000000))


#Multiple Timers
from timifypy import timer

with timer("step 1"):
    sum(range(500000))

with timer("step 2"):
    sum(range(500000, 1000000))


##Using Stopwatch for Multiple Steps
from timifypy import Stopwatch

sw = Stopwatch()

sw.start()
sum(range(500000))
sw.stop()
print("Step 1:", sw)

sw.start()
sum(range(500000, 1000000))
sw.stop()
print("Step 2:", sw)

print("Total elapsed:", sw.elapsed)



