Show
Ignore:
Timestamp:
09/02/05 16:53:40 (8 years ago)
Author:
ahu
Message:

remove quite a number of gettimeofday calls

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pdns/pdns/pdns_recursor.cc

    r464 r469  
    483483}; 
    484484 
     485#if 0 
     486 
     487#include <execinfo.h> 
     488 
     489static void maketrace() 
     490{ 
     491  void *array[20]; //only care about last 17 functions (3 taken with tracing support) 
     492  size_t size; 
     493  char **strings; 
     494  size_t i; 
     495 
     496  size = backtrace (array, 20); 
     497  strings = backtrace_symbols (array, size); //Need -rdynamic gcc (linker) flag for this to work 
     498 
     499  for (i = 0; i < size; i++) //skip useless functions 
     500    cout<<strings[i]<<"\n"; 
     501  cout<<"--"<<endl; 
     502} 
     503 
     504extern "C" { 
     505int gettimeofday (struct timeval *__restrict __tv, 
     506                  __timezone_ptr_t __tz) 
     507{ 
     508  maketrace(); 
     509  return 0; 
     510} 
     511 
     512} 
     513#endif  
     514 
    485515int main(int argc, char **argv)  
    486516{