Registry / serialization / hightime

hightime

JSON →
library1.0.0pypypiunverified

Hightime is a Python library from National Instruments designed for representing and manipulating durations and time intervals with high precision. It provides classes like `Interval` and `Unit` to define time quantities, enabling arithmetic operations and conversions between different units. The current stable version is 1.0.0, which includes significant improvements in Python version compatibility and type hinting. Releases appear to be driven by feature additions and Python version updates rather than a fixed schedule.

pip install hightime
INSTALL
IMPORT
SIG · HIGHTIME
H
hightime
serializationpythonv1.0.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Interval
from hightime import Interval
from hightime import Interval
datetime
from hightime import datetime
from hightime import datetime
timedelta
from hightime import timedelta
from hightime import timedelta

This quickstart demonstrates how to create `Interval` objects, perform basic arithmetic, and convert intervals between different `Unit` types. It also shows how to retrieve precise total seconds.

from hightime import Interval, Unit # Create an interval of 5.5 seconds interval_a = Interval(5.5, Unit.SECONDS) print(f"Interval A: {interval_a}") # Create another interval of 1000 milliseconds interval_b = Interval(1000, Unit.MILLISECONDS) print(f"Interval B: {interval_b}") # Perform arithmetic operations interval_sum = interval_a + interval_b print(f"Sum: {interval_sum}") # Should be 6.5 seconds # Convert an interval to different units milliseconds = interval_sum.in_units(Unit.MILLISECONDS) print(f"Sum in milliseconds: {milliseconds} ms") # Access total seconds with higher precision total_seconds_precise = interval_sum.precision_total_seconds print(f"Sum in precise total seconds: {total_seconds_precise} s")
Debug
Known issues
breakingVersion 1.0.0 dropped support for Python 3.7 and 3.8. Users on these older Python versions must upgrade their Python environment or use an older version of the `hightime` library.
fix
Upgrade your Python environment to 3.9 or newer (e.g., Python 3.9-3.13 are supported by v1.0.0).
affects: >=1.0.0
gotchaWhen running on PyPy, versions of `hightime` prior to 1.0.0 could experience infinite recursion if `copy` or `pickle` operations were performed on `hightime` objects.
fix
Upgrade to `hightime` version 1.0.0 or newer to resolve the infinite recursion issue on PyPy.
affects: <1.0.0
gotchaOlder versions of `hightime` (pre-1.0.0) had issues with comparisons against 'unknown types', potentially leading to unexpected `TypeError` or incorrect comparison results.
fix
Ensure you are using `hightime` version 1.0.0 or newer. When comparing `Interval` objects, ensure the other operand is also a `hightime.Interval` or a type explicitly supported for comparison.
affects: <1.0.0
gotchaFor maximum precision when getting the total duration in seconds, use `interval.precision_total_seconds`. The `total_seconds` property might truncate precision in some cases.
fix
Use `interval.precision_total_seconds` (available from v0.2.2) for the most accurate representation of an interval's total duration in seconds.
affects: <0.2.2
Upgrade
Version history
1.0.0latest on PyPI · released Oct 2, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources
hightime — pip install hightime · libregistry