-def _create_clock_snapshot_from_ptr(ptr):
- clock_snapshot = _ClockSnapshot._create_from_ptr(ptr)
- return clock_snapshot
-
-
-class _ClockSnapshot(object._UniqueObject):
- def __init__(self, clock_class_ptr, cycles):
- utils._check_uint64(cycles)
- ptr = native_bt.clock_snapshot_create(clock_class_ptr, cycles)
-
- if ptr is None:
- raise bt2.CreationError('cannot create clock value object')
-
- super().__init__(ptr)
-