device = initiate_device(path='')
raw_stream = RawReader.from_device(device=device, max_events=int(1e9))
device.get_i_events_stream().start()
device.get_i_events_stream().log_raw_data("test_0.raw")
j = 0
while j < 400:
raw_stream.load_delta_t(33333)
j=j+1
print(j)
device.get_i_events_stream().stop()
device.get_i_events_stream().stop_log_raw_data()
time.sleep(5)
device.get_i_events_stream().start()
device.get_i_events_stream().log_raw_data("test_1.raw")
j = 0
while j < 400:
raw_stream.load_delta_t(33333)
j=j+1
print(j)
device.get_i_events_stream().stop()
device.get_i_events_stream().stop_log_raw_data()
exit()