Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EdosL0Util
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SIPS
EdosL0Util
Commits
75fa96b8
Commit
75fa96b8
authored
7 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
fix failing rdrgen tests
parent
887ad75c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
edosl0util/merge.py
+3
-4
3 additions, 4 deletions
edosl0util/merge.py
edosl0util/timecode.py
+4
-1
4 additions, 1 deletion
edosl0util/timecode.py
with
7 additions
and
5 deletions
edosl0util/merge.py
+
3
−
4
View file @
75fa96b8
...
...
@@ -49,10 +49,9 @@ class _Ptr(object):
def
__lt__
(
self
,
that
):
return
(
self
.
stamp
,
self
.
apid
)
<
(
that
.
stamp
,
that
.
apid
)
# WTF?
# instances with same timecode/apid/size will compare the same
# def __hash__(self):
# return hash((self.stamp, self.apid, self.size))
# hash by stamp, apid, size so we can dedup in index using set
def
__hash__
(
self
):
return
hash
((
self
.
stamp
,
self
.
apid
,
self
.
size
))
def
bytes
(
self
):
self
.
fobj
.
seek
(
self
.
offset
,
os
.
SEEK_SET
)
...
...
This diff is collapsed.
Click to expand it.
edosl0util/timecode.py
+
4
−
1
View file @
75fa96b8
...
...
@@ -30,7 +30,9 @@ def timecode_parts_to_iet(days, ms, us, epoch):
Convert components to a IET based on arbitrary epoch.
"""
return
int
(
_grain
.
utc2tai
(
epoch
+
timedelta
(
days
=
days
,
milliseconds
=
ms
,
microseconds
=
us
),
epoch
+
timedelta
(
days
=
float
(
days
),
milliseconds
=
float
(
ms
),
microseconds
=
float
(
us
)),
epoch
)
*
1e6
)
...
...
@@ -56,4 +58,5 @@ def dt_to_cds(dt):
return
(
d
.
days
,
int
(
d
.
seconds
*
1e3
),
d
.
microseconds
)
dt_to_iet
=
_grain
.
utc2iet
iet_to_dt
=
_grain
.
iet2utc
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment