Skip to content

Conversation

bpinsard
Copy link
Contributor

fix proposition for datetime.timedelta.total_seconds in python 2.6
see issue #651

runtime.duration = (parseutc(runtime.endTime) -
parseutc(runtime.startTime)).total_seconds()
timediff = parseutc(runtime.endTime) - parseutc(runtime.startTime)
runtime.duration = timediff.days * 86400 + timediff.seconds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add timediff.microseconds to both of these?

timediff.days * 86400 + timediff.seconds + timediff.microseconds/100000. -> as a float.

satra added a commit that referenced this pull request Sep 13, 2013
@satra satra merged commit 8fbaf0a into nipy:master Sep 13, 2013
@satra
Copy link
Member

satra commented Sep 14, 2013

closes #651

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants