1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

python/nt_time: have a go at using 1_000_000 number separators.

I noticed these are available in Python 3.6+, which is what we support,
and they're arguably nicer than using exponentiation.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2024-02-23 16:23:03 +13:00 committed by Andrew Bartlett
parent d3d87aee2a
commit 00daa520ce

View File

@ -28,7 +28,7 @@ NtTimeDelta = NewType("NtTimeDelta", int)
NT_EPOCH = datetime.datetime(1601, 1, 1, 0, 0, 0, 0, tzinfo=datetime.timezone.utc)
NT_TICKS_PER_μSEC = 10
NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 10**6
NT_TICKS_PER_SEC = NT_TICKS_PER_μSEC * 1_000_000
def _validate_nt_time(nt_time: NtTime) -> None: