5import isystem.connect
as ic
10EXAMPLE_TRD_FILE_NAME =
"sdk_example.trd"
13def test_getSetSessionDuration():
14 connMgr = ic.ConnectionMgr()
15 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
17 profCtrl = ic.CProfilerController2(connMgr, EXAMPLE_TRD_FILE_NAME,
"u")
18 profCtrl.waitUntilLoaded(5000, isThrow=
True)
20 print(
"Setting session duration of trigger with index 0 to 100 ms:")
21 profCtrl.setSessionDuration(0, 100)
23 if profCtrl.getSessionDuration(0) == 100:
26 print(f
"\tError, actual session duration: {profCtrl.getSessionDuration(0)} ms")
30if __name__ ==
"__main__":
31 test_getSetSessionDuration()