mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
fix: allow assignment of time points of resolutions other than that of a system clock (#2481)
This commit is contained in:
@@ -200,3 +200,13 @@ def test_nano_timepoint():
|
||||
time = datetime.datetime.now()
|
||||
time1 = m.test_nano_timepoint(time, datetime.timedelta(seconds=60))
|
||||
assert(time1 == time + datetime.timedelta(seconds=60))
|
||||
|
||||
|
||||
def test_chrono_different_resolutions():
|
||||
resolutions = m.different_resolutions()
|
||||
time = datetime.datetime.now()
|
||||
resolutions.timestamp_h = time
|
||||
resolutions.timestamp_m = time
|
||||
resolutions.timestamp_s = time
|
||||
resolutions.timestamp_ms = time
|
||||
resolutions.timestamp_us = time
|
||||
|
||||
Reference in New Issue
Block a user