small edits
authorbdemsky <bdemsky@uci.edu>
Fri, 6 Apr 2018 18:06:04 +0000 (11:06 -0700)
committerbdemsky <bdemsky@uci.edu>
Fri, 6 Apr 2018 18:06:04 +0000 (11:06 -0700)
version2/src/C/TimingSingleton.h
version2/src/C/hashtable.h

index 945f90ae6a0a70b191dc615a575a2ab5f5886627..3bc851baa2d941af1815994a1e0d1dc7afe5d43d 100755 (executable)
@@ -1,6 +1,7 @@
 #ifndef TIMINGSINGLETON_H
 #define TIMINGSINGLETON_H
-#include <sys/time.h>
+//#include <sys/time.h>
+#include "common.h"
 
 class TimingSingleton {
 private:
@@ -13,8 +14,6 @@ public:
        }
 
        int64_t nanoTime() {
-               int64_t time;
-               struct timeval tv;
                return 0;
        }
 
index e82874680981b741db3f8a7806955a092257bbde..439e48bb5b461e07d065210a449c54e87b89f01e 100755 (executable)
@@ -132,17 +132,6 @@ public:
                tail = list = NULL;
        }
 
-       /** Doesn't work with zero value */
-       _Val getRandomValue() {
-               while (true) {
-                       unsigned int index = random() & capacitymask;
-                       struct Hashlistnode<_Key, _Val> *bin = &table[index];
-                       if (bin->key != NULL && bin->val != NULL) {
-                               return bin->val;
-                       }
-               }
-       }
-
        void resetAndDeleteKeys() {
                for (unsigned int i = 0; i < capacity; i++) {
                        struct Hashlistnode<_Key, _Val> *bin = &table[i];