Example #1
0
	
e2.value(eout)

d1.fromString("+1 02:03:04.567890")

e1.add(d1.value())
	
pStr = e1.toString(acstime.TSArray,allOut,0L, 0L)
	
print pStr 

# test Epoch.difference()
d2_val = e1.difference(e2.value())
	
d2 = DurationHelper(d2_val)
pStr = d2.toString("")
	
print pStr 
	
# test Epoch.subtract()
e1.subtract(d1.value())

pStr = e1.toString(acstime.TSArray,allOut,0L, 0L)

print pStr 

# test Epoch.compare() using Epoch.now()
eout = getTimeStamp()
	
e1.value(eout)
# along with this library; if not, write to the Free Software Foundation,
# Inc.,
# 675 Massachusetts Ave, Cambridge, MA 02139, USA.  Correspondence concerning
# ALMA should be addressed as follows:
#
# Internet email: [email protected]
'''
'''
#--REGULAR IMPORTS-------------------------------------------------------------

import acstime
from Acspy.Common.DurationHelper import DurationHelper
#------------------------------------------------------------------------------
print "----------------------"
d1 = DurationHelper(0x7FFFFFFFFFFFFFFA)
print d1.toString("")
print "----------------------"
d1.value(long(0))
print d1.toString("")
print "----------------------"
#For some reason or another, this test taken from the C++ modular test of acstime
#causes overflow errors in Python! Commented out for now
#d1.value(0x8000000000000008 + 8L)
#print d1.toString("")
print "----------------------"
d1.fromString("10675199 02:48:05.47758")
print d1.value().value
print "----------------------"
d1.fromString("0:0:0")
print d1.value().value
print "----------------------"
# along with this library; if not, write to the Free Software Foundation,
# Inc.,
# 675 Massachusetts Ave, Cambridge, MA 02139, USA.  Correspondence concerning
# ALMA should be addressed as follows:
#
# Internet email: [email protected]
'''
'''
#--REGULAR IMPORTS-------------------------------------------------------------

import acstime
from Acspy.Common.DurationHelper import DurationHelper
#------------------------------------------------------------------------------
print "----------------------"
d1 = DurationHelper(0x7FFFFFFFFFFFFFFA)
print d1.toString("")
print "----------------------"
d1.value(long(0))
print d1.toString("")
print "----------------------"
#For some reason or another, this test taken from the C++ modular test of acstime
#causes overflow errors in Python! Commented out for now
#d1.value(0x8000000000000008 + 8L)
#print d1.toString("")
print "----------------------"
d1.fromString("10675199 02:48:05.47758")
print d1.value().value
print "----------------------"
d1.fromString("0:0:0")
print d1.value().value
print "----------------------"