Revision f34ea400

View differences:

client/python/hlrc_client/RobotTimestamp.py
28 28
import sys
29 29

  
30 30
class RobotTimestamp:
31
    def __init__(self):
32
        seconds = time.time()
31
    def __init__(self, seconds=None):
32
        if (seconds is None):
33
            seconds = time.time()
33 34
        self.init_from_sec(seconds)
34 35

  
35 36
    @classmethod
36
    def from_sec(cls, _float_sec):
37
        cls.set_to_floatsec(_float_sec)
38

  
39
    @classmethod
40 37
    def from_sec_nsec(cls, _sec, _nsec):
41 38
        cls.sec  = _sec
42 39
        cls.nsec = _nsec

Also available in: Unified diff