Skip to content
Snippets Groups Projects
Commit 172dc979 authored by Pierrick Koch's avatar Pierrick Koch
Browse files

[wip/libpointmatcher] use CLOCK_PROF on NetBSD

parent 88c2a0e6
No related branches found
No related tags found
No related merge requests found
SHA1 (libpointmatcher-1.1.0.tar.gz) = 49ae5a799f90bd8f381d0a0a444465ad35c1e64b
RMD160 (libpointmatcher-1.1.0.tar.gz) = dd9dfb488f44ca7d5231ce7f80b5b408f6e42269
Size (libpointmatcher-1.1.0.tar.gz) = 1849742 bytes
SHA1 (patch-aa) = 1fdeea52150e0879db0cf245b704db70fcc341d0
diff --git pointmatcher/Timer.cpp pointmatcher/Timer.cpp
index cdd18da..ba2a3a6 100644
--- pointmatcher/Timer.cpp
+++ pointmatcher/Timer.cpp
@@ -68,7 +68,11 @@ namespace PointMatcherSupport
return Time(now.tv_sec) * Time(1000000000) + Time(now.tv_nsec);
#else // __MACH__
struct timespec ts;
+ #ifdef __NetBSD__
+ clock_gettime(CLOCK_PROF, &ts);
+ #else
clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts);
+ #endif
return Time(ts.tv_sec) * Time(1000000000) + Time(ts.tv_nsec);
#endif // __MACH__
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment