mirror of
https://github.com/lbonn/rofi
synced 2024-11-23 12:23:02 +00:00
Remove unused TIMING.
This commit is contained in:
parent
b143a8cd94
commit
d9db18266c
3 changed files with 0 additions and 56 deletions
|
@ -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
|
||||
##
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue