48 gettimeofday( &tv,
NULL );
49 return double(tv.tv_sec) + double(tv.tv_usec) / 1000000.0;
52 int main(
int argc,
char **argv )
57 QObject::connect( obj, SIGNAL( changed() ), obj, SLOT( onChanged() ));
64 for(
int i = 0; i < count; i++ )
66 QObject::disconnect( obj, SIGNAL( changed() ), obj, SLOT( onChanged() ));
68 QObject::connect( obj, SIGNAL( changed() ), obj, SLOT( onChanged() ));
71 printf(
"disconnect/emit/connect %d times took %lf seconds.\n", count, end - start );
76 for(
int i = 0; i < count; i++ )
83 printf(
"suppress/emit/enable %d times took %lf seconds.\n", count, end - start );
int main(int argc, char **argv)