Skip to content

Commit

Permalink
Remove extraneous scaleb(-9) in set_ts_tod_ns in ptp_td so that the s…
Browse files Browse the repository at this point in the history
…econds field can be set correctly

Signed-off-by: Alex Forencich <[email protected]>
  • Loading branch information
alexforencich committed Feb 9, 2024
1 parent 22abe6c commit ae17f7d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion tb/ptp_td.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def set_ts_tod_64(self, ts):

def set_ts_tod_ns(self, t):
ts_s, ts_ns = self.ctx.divmod(Decimal(t), Decimal(1000000000))
ts_s = ts_s.scaleb(-9).to_integral_value()
ts_ns, ts_fns = self.ctx.divmod(ts_ns, Decimal(1))
ts_ns = ts_ns.to_integral_value()
ts_fns = (ts_fns * Decimal(2**32)).to_integral_value()
Expand Down

0 comments on commit ae17f7d

Please sign in to comment.