Opened 17 years ago
Closed 17 years ago
#74 closed enhancement (fixed)
Support MinGW
Reported by: | Alpar Juttner | Owned by: | Balazs Dezso |
---|---|---|---|
Priority: | major | Milestone: | LEMON 1.0 release |
Component: | core | Version: | |
Keywords: | Cc: | ||
Revision id: |
Description (last modified by )
Support MinGW
Attachments (4)
Change History (14)
comment:1 Changed 17 years ago by
Owner: | changed from Alpar Juttner to Balazs Dezso |
---|
Changed 17 years ago by
Attachment: | time_measure_port.hg added |
---|
comment:2 Changed 17 years ago by
comment:3 Changed 17 years ago by
A port of time_measure.h can already be found in ticket:52. Therefore I suggest waiting with this until those changes gets into the main branch.
Changed 17 years ago by
Attachment: | mingw_compatible_time_measure.patch added |
---|
comment:5 follow-up: 6 Changed 17 years ago by
Replying to deba:
New patch based on the ported time_measure.h.
Thanks. In fact, it seems to be more than just a mingw compatibility fix, a lot of internals has also (positively) changed.
I have to minor issued.
- In the old version, TimeStamp stored the number of kernel ticks instead of seconds because I was worried whether rounding error could cause some problem. (The time of a kernel tick cannot be represented precisely on a double). Right now, I cannot see any real-life example where it would really cause problem, so I'm not against this change at all, just ask you to reconsider this change once more.
- In the
stamp()
function, please move the #ifdef into the execution block. (Otherwise it may happen that the documentation will not be generated to this function on Windows.)
Changed 17 years ago by
Attachment: | mingw_compatible_time_measure.2.patch added |
---|
comment:6 Changed 17 years ago by
Description: | modified (diff) |
---|
Replying to alpar:
Replying to deba:
New patch based on the ported time_measure.h.
Thanks. In fact, it seems to be more than just a mingw compatibility fix, a lot of internals has also (positively) changed.
I have to minor issued.
- In the old version, TimeStamp stored the number of kernel ticks instead of seconds because I was worried whether rounding error could cause some problem. (The time of a kernel tick cannot be represented precisely on a double). Right now, I cannot see any real-life example where it would really cause problem, so I'm not against this change at all, just ask you to reconsider this change once more.
- In the
stamp()
function, please move the #ifdef into the execution block. (Otherwise it may happen that the documentation will not be generated to this function on Windows.)
comment:7 follow-up: 9 Changed 17 years ago by
Description: | modified (diff) |
---|
2) I uploaded the new patch based on your issue. 1) In my opinion, the rounding error is just a slightly dependent on this change. If t1 and t2 values are the retrieved timestamps and c is the clock time, then the (t2-t1)/c and the t2/c-t1/c should give back nearly the same value, because the division could not cause big relative error. But I think, the conversion from clock_t to double, which is already in the original version, could cause big relative error, when we subtract t1 from t2. However, on a regular linux desktop it does not cause problem, because the sensitivity of timer is at most 1/1000 second, and the double value has 52 binary digits, so more than 140 thousand years can measured with TimeStamp??.
Changed 17 years ago by
Attachment: | mingw_compatibility_graph_to_eps.patch added |
---|
comment:9 Changed 17 years ago by
Replying to deba:
1) In my opinion, [...]
My only concert was the case of exact comparison, which sometimes might be useful. If we store the times as (integer) ticks, then double will compute accurately with the number of this magnitude. If store the values in seconds, the computations will not be exact.
Anyway, I think it is less than minor issue.
I put the second patch (with a changes commit log) into the main branch: [e1dd2a70737c]
comment:10 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I uploaded a port for time_measure.h
It is modified in order to support mingw32 time functions.