Add missing include of <ctime> to fix build with glibc 2.36 #2533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
| include/openbabel/obutil.h:65:14: error: 'clock' was not declared in this scope
| 65 | start= clock();
| | ^~~~~
| include/openbabel/obutil.h:40:1: note: 'clock' is defined in header ''; did you forget to '#include '?
| 39 | #include <math.h>
| +++ |+#include
| 40 |
| include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()':
| include/openbabel/obutil.h:70:13: error: 'clock' was not declared in this scope
| 70 | stop= clock();
| | ^~~~~
| include/openbabel/obutil.h:70:13: note: 'clock' is defined in header ''; did you forget to '#include '?
| include/openbabel/obutil.h:71:40: error: 'CLOCKS_PER_SEC' was not declared in this scope
| 71 | return((stop - start) / (double) CLOCKS_PER_SEC);
| | ^~~~~~~~~~~~~~
| include/openbabel/obutil.h:71:40: note: the macro 'CLOCKS_PER_SEC' had not yet been defined
Signed-off-by: Andreas Müller schnitzeltony@gmail.com