Module simwbDLClient :: Class DLTime

Class DLTime

object --+
         |
        DLTime


Data Logger client data record time class.

This class provides a common time object for manipulating data record time.
Internally, time is stored and maniuplated in microseconds since SimWB
frame times are only accurate to the microsecond (even though they are
reported as seconds and nanoseconds).

Create an object:
    import simwbPath
    import simwbDLClient as dl
    t = dl.DLTime(microseconds)
    t = dl.DLTime(seconds, nanoseconds)
    t = dl.DLTime()   # 0 microseconds
    t.load(1000)      # 1000 microseconds
    t.load(12,40000)  # 12 seconds + 40000 nanoseconds, or 12000040 usec

Time properties (using the last example above):
    t.us              # (long)  microseconds               12000040
    t.sec             # (float) seconds                    12.00004
    t.asctime         # (ASCII) string ala time.asctime()  'Wed Dec 31 19:00:12 1969'

Standard mathematical/logical operations that make sense for times are
defined between DLTime objects.

Instance Methods
 
__abs__(self)
 
__add__(self, other)
 
__bool__(self)
 
__div__(self, other)
 
__eq__(self, other)
 
__float__(self)
 
__ge__(self, other)
 
__gt__(self, other)
 
__hash__(self)
hash(x)
 
__hex__(self)
 
__iadd__(self, other)
 
__idiv__(self, other)
 
__imul__(self, other)
 
__index__(self)
 
__init__(self, p1=0, p2=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__int__(self)
 
__isub__(self, other)
 
__le__(self, other)
 
__long__(self)
 
__lt__(self, other)
 
__mul__(self, other)
 
__ne__(self, other)
 
__neg__(self)
 
__nonzero__(self)
 
__oct__(self)
 
__pos__(self)
 
__radd__(self, other)
 
__rdiv__(self, other)
 
__repr__(self)
repr(x)
 
__rmul__(self, other)
 
__rsub__(self, other)
 
__sub__(self, other)
 
load(self, p1=0, p2=None)
Load a DLTime object:...

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties
  asctime
String representation ala time.asctime()
  sec
Time as floating point seconds

Inherited from object: __class__

Method Details

__hash__(self)
(Hashing function)

 

hash(x)

Overrides: object.__hash__
(inherited documentation)

__init__(self, p1=0, p2=None)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

load(self, p1=0, p2=None)

 

Load a DLTime object:
    t.load(microseconds)
    t.load(seconds, nanoseconds)


Property Details

asctime

String representation ala time.asctime()

Get Method:
_getAsctime(self)

sec

Time as floating point seconds

Get Method:
_getSec(self)
Set Method:
_setSec(self, s)