Metadata-Version: 2.4
Name: harrys-toolbox
Version: 1.0.0
Summary: Harry's Toolbox is a collection of lightweight Python utilities. Each designed to simplify a basic task, such as calculating the framerate of a video feed.
Author: Harry Boyd
License: Copyright 2025 Harry Boyd
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the “Software”), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
        the Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
        FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
        COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
        IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
        CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
        
Project-URL: Homepage, https://github.com/HBoyd255/harrys-toolbox
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Harry's Toolbox

Harry's Toolbox is a collection of lightweight Python utilities. Each designed
to simplify a basic task, such as calculating the framerate of a video feed.

## FPS Counter

The FPS Counter module is designed to simplify the process of monitoring the
framerate of a video feed.

After creating an instance of the FPSCounter class, the module works by
expanding "to string" function `__str__` to measure the time since the `__str__`
function was last called, and uses this time difference to calculate the frame
rate.

### Example Usage

```python
import time

from harrys_toolbox import FPSCounter

fps = FPSCounter()

while True:

    # Prints out the framerate of the video
    print(fps)

    # Delay to represent the processing time of each frame.
    time.sleep(0.01)

```

### Terminal Output

```
FPS: 96.02
```

## Millis

Returns the number of milliseconds since the module was imported, as an integer.
This function is based on the
[Arduino function of the same name](https://docs.arduino.cc/language-reference/en/functions/time/millis/).

### Example Usage

```python
import time
from harrys_toolbox import millis

while True:
    print(millis())

    time.sleep(1)
```

### Terminal Output

```
0
1001
2001
3002
```
