sdds_time.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def setFromTime(self, time_sec=time.time() ):
         """
         Create a sdds time object from the input parameter. If the time_sec is from the epoch
         then we need to convert to the current year as per spec.
         """
         if time_sec:
              if time_sec >= self.startofyear:
                   # UTC.. need to convert to SDDS EPOCH
                   time_sec = time_sec - self.startofyear

         pfrac, pwhole = math.modf(time_sec*Time.TicFreq)
         self.ps250_ = long(pwhole)
         self.pf250_ = int( pfrac*Time.Two32)
         #print "td: %12Lu %12u %16.2Lf " % ( self.ps250_, self.pf250_, pfrac )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号