← Back to team overview

kicad-developers team mailing list archive

[PATCH 4/4] Remove old profile counter implementation

 

---
 include/profile.h | 58 -------------------------------------------------------
 1 file changed, 58 deletions(-)

diff --git a/include/profile.h b/include/profile.h
index ae2840e53..b08303f1e 100644
--- a/include/profile.h
+++ b/include/profile.h
@@ -30,69 +30,11 @@
 #ifndef __TPROFILE_H
 #define __TPROFILE_H
 
-#include <sys/time.h>
-#include <stdint.h>
-
-#include <cstdio>
 #include <chrono>
 #include <string>
 #include <iostream>
 #include <iomanip>
 
-/**
- * Function get_tics
- * Returns the number of microseconds that have elapsed since the system was started.
- * @return uint64_t Number of microseconds.
- */
-static inline uint64_t get_tics()
-{
-    struct timeval tv;
-    gettimeofday( &tv, NULL );
-
-    return (uint64_t) tv.tv_sec * 1000000ULL + (uint64_t) tv.tv_usec;
-}
-
-/**
- * Structure for storing data related to profiling counters.
- */
-struct prof_counter
-{
-    uint64_t start, end;         // Stored timer value
-
-    uint64_t usecs() const
-    {
-        return end - start;
-    }
-
-    float msecs() const
-    {
-        return ( end - start ) / 1000.0;
-    }
-};
-
-/**
- * Function prof_start
- * Begins code execution time counting for a given profiling counter.
- * @param aCnt is the counter which should be started.
- * use_rdtsc tells if processor's time-stamp counter should be used for time counting.
- *      Otherwise is system tics method will be used. IMPORTANT: time-stamp counter should not
- *      be used on multicore machines executing threaded code.
- */
-static inline void prof_start( prof_counter* aCnt )
-{
-    aCnt->start = get_tics();
-}
-
-/**
- * Function prof_stop
- * Ends code execution time counting for a given profiling counter.
- * @param aCnt is the counter which should be stopped.
- */
-static inline void prof_end( prof_counter* aCnt )
-{
-    aCnt->end = get_tics();
-}
-
 class PROF_COUNTER
 {
 public:

References