8

Format frame.start_time and end_time to relative time


Avatar
Tim

Currently, it is formatted to UTC time. The request is to allow formatting to reference from the start of capture.

A

Activity Newest / Oldest

Avatar

Kurt

Is there any progress on this? Or any suggestions on, how in the Report view, I can print out a time

It would be be nice to be able to correlate some of the data I output: like
```
2022-08-14T23:01:34.790480620000Z , IN , 0x0 , 0xb , 0xc 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
2022-08-14T23:01:34.790581180000Z , SETUP , 0x0 , 0xb , 0xa1 0x1 0xc 0x3 0x0 0x0 0x9 0x0
2022-08-14T23:01:34.790650580000Z , IN , 0x0 , 0xb , 0xc 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
2022-08-14T23:01:34.790746060000Z , SETUP , 0x0 , 0xb , 0xa1 0x1 0xc 0x3 0x0 0x0 0x9 0x0
2022-08-14T23:01:34.790815640000Z , IN , 0x0 , 0xb , 0xc 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
2022-08-14T23:01:34.790913120000Z , SETUP , 0x0 , 0xb , 0xa1 0x1 0xc 0x3 0x0 0x0 0x9 0x0
2022-08-14T23:01:34.791026660000Z , IN , 0x0 , 0xb , 0xc 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
2022-08-14T23:01:34.900413040000Z , IN , 0x1 , 0xb , 0x10 0x40 0x54 0x2 0x0 0x26 0x11 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x3e 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
```
And for example, figure out how it relates to maybe Control packet output for the LLA, which has stuff like:
```
SETUP address: 0x0B time: 24.064426839999999
bmRequestType=0x80 Data direction=Device to host, Type=Standard, Recipient=Device
bRequest=0x06 GET_DESCRIPTOR
wValue=0x0302 Descriptor=STRING, Index=0x02
wIndex=0x0409 Language=English (United States)
wLength=0x00FF
DATA time: 24.064447600000001

Descriptor time: 24.064496380000001
bLength=0x12
bDescriptorType=0x03 STRING
wchar=0x0049 char='I'
wchar=0x006E char='n'
wchar=0x0074 char='t'
wchar=0x0075 char='u'
wchar=0x006F char='o'
wchar=0x0073 char='s'
wchar=0x0020 char=' '
wchar=0x0053 char='S'
STATUS time: 24.06451796
ACK
```


Avatar

Tim

Sorry we don't have an update on this yet. However, I did notice that you posted a workaround in our discuss forum below. Thanks for sharing that btw!
discuss.saleae.com/t/how-to-get-the-0s-starting-time-from-highlevelanalyzer/1611/5


Avatar

Tim

discuss.saleae.com/t/how-to-get-the-0s-starting-time-from-highlevelanalyzer/1611
I am trying to print the absolute time starting from 0s in the terminal.
The first frames.start_time I get in class Hal is like this
2022-05-25T05:44:03.173772160000Z. My idea is to take it as a base “time” 0s.
But it seems not the correct 0s!?


Avatar

Tim

"the reason I want to get this 0s is because I would like
to format my own string in terminal with “relative time” which can mapping to the waveform screen time line, so I can quick to find it in between."


Avatar

Tim

(#62380)
"Is there a function along the lines of frame.start_time.relative_to_capture_start? Or alternatively is there a variable I can access that holds the start of the capture so I can indirectly calculate the time relative to capture start, with something like float(frame.start_time - capture.start_time), if that makes sense?"


M

Mark

This seems like the best choice from my perspective. This will need to wait till the next HLA API update for now though.
> Or alternatively is there a variable I can access that holds the start of the capture so I can indirectly calculate the time relative to capture start, with something like float(frame.start_time - capture.start_time), if that makes sense?"


Avatar

Tim

(#63831)
"I am looking to find how to get the time value of a frame in decode. Frames have a start and end time in microseconds, but I would like to find that number, so I can work with it"