Remove extraneous scaleb(-9) in set_ts_tod_ns so that the seconds value is set correctly

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich
2024-02-09 15:11:32 -08:00
parent afb7d2bd10
commit bc8dbb039c

View File

@@ -132,7 +132,6 @@ class PtpClock(Reset):
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()