COIN-OR::LEMON - Graph Library

Opened 5 years ago

Last modified 15 months ago

#452 new defect

time_measure.h uses obsolete headears

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

Description (last modified by alpar)

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 4 years ago by alpar

  • Description modified (diff)

comment:2 follow-up: Changed 4 years ago by deba

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 4 years ago by alpar

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 4 years ago by alpar

  • Milestone changed from LEMON 1.3 release to LEMON 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 17 months ago by alpar

  • Milestone changed from LEMON 1.4 release to LEMON 1.5 release

comment:6 Changed 15 months ago by alpar

  • Priority changed from major to minor
Note: See TracTickets for help on using tickets.