Hello, I don't understand the TimeSpan class.
Can anyone explain the following result.
The anser I got from the wx-users mailing list was
""" I can't explain this but it seems a Python-specific problem
because I don't see it in C++: """
It's true. The underlying wxWidgets wxTimeSpan class stores its core
value in a wxLongLong, which is a 64-bit integer. That's enough to
store the number of milliseconds in half a billion years.
However, the wxPython interface uses "long" for setting and returning
the milliseconds value (because Swig doesn't understand wxLongLong).
It's keeping the right number internally, but it can't show it to you.
Thus, the GetMilliseconds and GetSeconds values cannot be used for
intervals larger than about 49 days.
You can see this if you try to print your diff object directly. You get
an overflow exception.
···
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Hello, I don't understand the TimeSpan class.
Can anyone explain the following result.
The anser I got from the wx-users mailing list was
""" I can't explain this but it seems a Python-specific problem
because I don't see it in C++: """
It's true. The underlying wxWidgets wxTimeSpan class stores its core
value in a wxLongLong, which is a 64-bit integer. That's enough to
store the number of milliseconds in half a billion years.
However, the wxPython interface uses "long" for setting and returning
the milliseconds value (because Swig doesn't understand wxLongLong).
It's keeping the right number internally, but it can't show it to you.
Thus, the GetMilliseconds and GetSeconds values cannot be used for
intervals larger than about 49 days.
You can see this if you try to print your diff object directly. You get
an overflow exception.
Hmmm... I thought I had a typemap for wxLongLong that would convert it to a Python Long. It does work correctly in Phoenix however.