Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Negative timestamps #64

Open
lukaszog opened this issue Jul 26, 2019 · 0 comments
Open

Negative timestamps #64

lukaszog opened this issue Jul 26, 2019 · 0 comments

Comments

@lukaszog
Copy link

lukaszog commented Jul 26, 2019

I'm using pyuvc on RPI3 and I discovered problem with timestamps. The problem is in line:
out_frame.timestamp = uvc_frame.capture_time.tv_sec + <double>uvc_frame.capture_time.tv_usec * 1e-6

Some times tv_sec and tv_usec together returns negative values. After a few minutes, they return positive values.

Example:

-950305
-2
-4980
-1
-918961
-1
-971470
-1
-887617
-1
-937959
-1
-856273
-1
-904449
-1
-824929
-1
-870939
-1
-793585
-1
-837428
-1
-762241
-1
-803918
-1
-730897
-1
-770407
-1
-699553
-1
-736897
-1
-668209
-1
-703386
-1
-636865
-1
-669876
-1
-605521
-1
-636366
-1
-574177
-1
-602855
-1
-542833
-1
-511489
-1
-569345
-1
-480145
-1
-535834
-1
-448801
-1
-502324
-1
-417457
-1
-468814
-1
-386114
-1
-435303
-1
-354770
-1
-401793
-1
-323426
-1
-368282
-1
-292082
-1
-334772
-1
-260738
-1
-301261
-1
-229394
-1
-267751
-1
-198050
-1
-234241
-1
-166706
-1
-200730
-1
-135362
-1
-167220
-1
-104018
-1
-133709
-1
-72674
-1
-100199
-1
-41330
-1
-66688
-1
-9986
0
-978642
-1
-33178
0
-947298
0
-999668
0
-915954
0
-966157
0
-884610
0
-932647
0
-853266
0
-899136
0
-821922
0
-865626
0
-790578
0
-832115
0
-759234
0
-798605
0
-727890
0
-765095
0
-696546
0
-731584
0
-665202
0
-698074
0
-633859
0
-664563
0
-602515
0
-631053
0
-571171
0
-539827
0
-597542
0
-508483
0
-564032
0
-477139
0
-530522
0
-445795
0
-497011
0
-414451
0
-463501
0
-383107
0
-429990
0
-351763
0
-396480
0
-320419
0
-362970
0
-289075
0
-329459
0
-257731
0
-295949
0
-225752
0
-262438
0
-194408
0
-228928
0
-163064
0
-195417
0
-131720
0
-161907
0
-100376
0
-128397
0
-69032
0
-94886
0
-37688
0
-6344
0
-61376
0
25000
0
-27865
0
56344
0
5645
0
87688
0
39156
0
119032
0
72666
0
150376
0
106176
0
181720
0
139687
0
213064
0
173197
0
244408
0
206708
0
275752
0
240218
0
307096
0
273729
0
338440
0
307239
0
369784
0
340749
0
401128
0
432472
0
374260
0
463816
0
407770
0
495160
0
441281
0
526504
0
474791
0
557848
0
508302
0
589192
0
541812
0
620536
0
575322
0
651880
0
608833
0
683224
0
642343
0
714568
0
675854
0
745912
0
709364
0
777256
0
742875
0
808600
0
776385
0
839943
0
809895
0
871287
0
843406
0
902631
0
876916
0
933975
0
965319
0
910427
0
996663
0
943937
1
28007
0
977447
1
59351
1
10958
1
90695
1
44468
1
122039
1
77979
1
153383
1
111489
1
184727
1
145000
1
216071
1
178510
1
247415
1
212020
1
278759
1
245531
1
310103
1
279041
1
341447
1
312552
1
372791
1
404135
1
346062
1
435479
1
379573
1
466823
1
413083
1
498167
1
446593
1
529511
1
480104
1
560855
1
513614
1
592199
1
547125
1
623543
1
580635
1
654887
1
614146
1
686231
1
647656
1
717575
1
681166
1
748919
1
714677
1
780263
1
748187
1
811607
1
781698
1
842951
1
815208
1
874295
1
848719
1
905639
1
936983
1
882229
1
968327
1
915739
1
999671
1
949250
2
31015
1
982760
2
62359
2
16271
2
93703
2
49781
2
125046
2
83291
2
156390
2
116802
2
187734
2
150312
2
219078
2
183823
2
250422
2
217333
2
281766
2
250844
2
313110
2
284354
2
344454
2
317864
2
375798
2
407142
2

It's possible to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant