2 #include <stdio.h> // for stdio
3 #include <unistd.h> // for exit()
4 #include <stdlib.h> // for exit()
5 #include <time.h> // for time
8 #include "pnd_dbusnotify.h"
10 int main ( int argc, char *argv[] ) {
11 pnd_dbusnotify_handle h;
13 h = pnd_dbusnotify_init();
15 time_t start = time ( NULL );
17 while ( time ( NULL ) - start < 20 ) {
18 printf ( "Tick %u\n", (unsigned int) ( time ( NULL ) - start ) );
20 if ( pnd_dbusnotify_rediscover_p ( h ) ) {
21 printf ( "Event!\n" );
29 pnd_dbusnotify_shutdown ( h );