summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2015-02-19 13:11:39 +0100
committerDave Davenport <qball@gmpclient.org>2015-02-19 13:11:39 +0100
commitd9db18266c65d3a9e2e2fc71289949ec53e32f1c (patch)
treeed3001ee5d5fe69df69be5ea651f8df66006dc50
parentb143a8cd9431004ef66fb355bcc02196cccc3f94 (diff)
Remove unused TIMING.
-rw-r--r--configure.ac9
-rw-r--r--source/dialogs/run-dialog.c31
-rw-r--r--source/dialogs/ssh-dialog.c16
3 files changed, 0 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac
index a4c0602b..6e9dbbef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,15 +37,6 @@ AC_ARG_ENABLE(gcov,
[ --enable-gcov Enable source code coverage testing using gcov],
[CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"])
-
-dnl
-dnl Enable timing debug output.
-dnl
-
-AC_ARG_ENABLE(timings,
- [ --enable-timings Enable debug information about timings],
- [CFLAGS="$CFLAGS -DTIMING"])
-
##
# Check dependencies
##
diff --git a/source/dialogs/run-dialog.c b/source/dialogs/run-dialog.c
index 8ce81464..0488f74f 100644
--- a/source/dialogs/run-dialog.c
+++ b/source/dialogs/run-dialog.c
@@ -42,9 +42,6 @@
#include "helper.h"
#include "history.h"
#include "dialogs/run-dialog.h"
-#ifdef TIMING
-#include <time.h>
-#endif
#define RUN_CACHE_FILE "rofi-2.runcache"
@@ -175,10 +172,6 @@ static char ** get_apps ( char **retv, unsigned int *length )
{
unsigned int num_favorites = 0;
char *path;
-#ifdef TIMING
- struct timespec start, stop;
- clock_gettime ( CLOCK_REALTIME, &start );
-#endif
if ( getenv ( "PATH" ) == NULL ) {
return NULL;
@@ -250,18 +243,6 @@ static char ** get_apps ( char **retv, unsigned int *length )
qsort ( &retv[num_favorites], ( *length ) - num_favorites, sizeof ( char* ), sort_func );
}
g_free ( path );
-#ifdef TIMING
- {
- clock_gettime ( CLOCK_REALTIME, &stop );
-
- if ( stop.tv_sec != start.tv_sec ) {
- stop.tv_nsec += ( stop.tv_sec - start.tv_sec ) * 1e9;
- }
-
- long diff = stop.tv_nsec - start.tv_nsec;
- printf ( "Time elapsed: %ld us\n", diff / 1000 );
- }
-#endif
unsigned int removed = 0;
for ( unsigned int index = num_favorites; index < ( ( *length ) - 1 ); index++ ) {
@@ -279,18 +260,6 @@ static char ** get_apps ( char **retv, unsigned int *length )
// Reduce array length;
( *length ) -= removed;
-#ifdef TIMING
- {
- clock_gettime ( CLOCK_REALTIME, &stop );
-
- if ( stop.tv_sec != start.tv_sec ) {
- stop.tv_nsec += ( stop.tv_sec - start.tv_sec ) * 1e9;
- }
-
- long diff = stop.tv_nsec - start.tv_nsec;
- printf ( "Time elapsed: %ld us\n", diff / 1000 );
- }
-#endif
return retv;
}
diff --git a/source/dialogs/ssh-dialog.c b/source/dialogs/ssh-dialog.c
index e0fb8d3e..43ce573a 100644
--- a/source/dialogs/ssh-dialog.c
+++ b/source/dialogs/ssh-dialog.c
@@ -43,9 +43,6 @@
#include "rofi.h"
#include "history.h"
#include "dialogs/ssh-dialog.h"
-#ifdef TIMING
-#include <time.h>
-#endif
#define SSH_CACHE_FILE "rofi-2.sshcache"
@@ -120,10 +117,6 @@ static char ** get_ssh ( unsigned int *length )
unsigned int num_favorites = 0;
char *path;
char **retv = NULL;
-#ifdef TIMING
- struct timespec start, stop;
- clock_gettime ( CLOCK_REALTIME, &start );
-#endif
if ( getenv ( "HOME" ) == NULL ) {
return NULL;
@@ -197,16 +190,7 @@ static char ** get_ssh ( unsigned int *length )
qsort ( &retv[num_favorites], ( *length ) - num_favorites, sizeof ( char* ), ssh_sort_func );
}
g_free ( path );
-#ifdef TIMING
- clock_gettime ( CLOCK_REALTIME, &stop );
- if ( stop.tv_sec != start.tv_sec ) {
- stop.tv_nsec += ( stop.tv_sec - start.tv_sec ) * 1e9;
- }
-
- long diff = stop.tv_nsec - start.tv_nsec;
- printf ( "Time elapsed: %ld us\n", diff / 1000 );
-#endif
return retv;
}