[Zope] Differents of two ZopeTime
fowlertrainer at anonym.hu
fowlertrainer at anonym.hu
Tue Mar 23 07:35:16 EST 2004
Hello Small,
Tuesday, March 23, 2004, 1:28:18 PM, you wrote:
SBS> From: <fowlertrainer at anonym.hu>
>> I want to measure the time of process in Zope.
>>
>> sd=context.ZopeTime()
>> ...
>> se=context.ZopeTime()
>> d=se-sd
>> print str(DateTime(str(sd))
>> print str(DateTime(str(se))
>>
>> it is working, so it is show the two datetimes.
>>
>> But how to I show the different of the times ?
>> print str(DateTime(str(d)) is not working good !
SBS> Try (untested):
SBS> sd=context.ZopeTime()
SBS> se=context.ZopeTime()
SBS> diff=context.ZopeTime(se-sd)
SBS> print "diff=",diff.strftime('%X')
SBS> This should give you a time difference in format: HH:MM:SS
SBS> HTH
Sorry, but it is not working...
It shows 1 second only for every differents !
See:
2004/03/23 13:33:27.878 GMT+1
2004/03/23 13:33:43.180 GMT+1
0:0:15 302
01:00:00 !!!!!!!
--
Best regards,
fowlertrainer mailto:fowlertrainer at anonym.hu
More information about the Zope
mailing list