COIN-OR::LEMON - Graph Library

Opened 6 years ago

Last modified 2 years ago

#452 new defect

time_measure.h uses obsolete headears

Reported by: Alpar Juttner Owned by: Alpar Juttner
Priority: minor Milestone: LEMON 1.5 release
Component: core Version: hg main
Keywords: Cc:
Revision id:

Description (last modified by Alpar Juttner)

time_measure.h includes obsolete (pre C++) headers, such as unistd.h, sys/times.h and sys/time.h which in turn define a couple of things in the global namespace. Using the C++ counterparts of these headers (I hope they exist) would be a better option.

Change History (6)

comment:1 Changed 5 years ago by Alpar Juttner

Description: modified (diff)

comment:2 Changed 5 years ago by Balazs Dezso

I don't think that there would be c++ counterparts of these functions (ctime supports only a fraction of the functionality what we need).

I think we should move the implementation of time_measure tools to a source file (.cc), so we could avoid to pollute the global namespace.

comment:3 in reply to:  2 Changed 5 years ago by Alpar Juttner

I think we should move the implementation of time_measure tools to a source file (.cc), so we could avoid to pollute the global namespace.

Ok, but then

  • TimeStamp::stamp() will not be an inline function. Can we neglect the running time overhead?
  • lemon/time_measure.h will not be a header only tool

comment:4 Changed 5 years ago by Alpar Juttner

Milestone: LEMON 1.3 releaseLEMON 1.4 release

Let us leave it as is for the time being. I didn't caused much problem so far, so it's probably safe to leave the bullet-proof solution for the future.

comment:5 Changed 2 years ago by Alpar Juttner

Milestone: LEMON 1.4 releaseLEMON 1.5 release

comment:6 Changed 2 years ago by Alpar Juttner

Priority: majorminor
Note: See TracTickets for help on using tickets.