OBJ_infopipe_channels,
OBJ_infopipe_title,
OBJ_infopipe_file,
+ OBJ_infopipe_bar,
#endif
#ifdef TCP_PORT_MONITOR
OBJ_tcp_portmon,
OBJ(infopipe_channels, INFO_INFOPIPE) END
OBJ(infopipe_title, INFO_INFOPIPE) END
OBJ(infopipe_file, INFO_INFOPIPE) END
+ OBJ(infopipe_bar, INFO_INFOPIPE) END
#endif
#ifdef TCP_PORT_MONITOR
OBJ(tcp_portmon, INFO_TCP_PORT_MONITOR)
OBJ(infopipe_file) {
snprintf(p, p_max_size, "%s", cur->infopipe.items[INFOPIPE_FILE]);
}
+ OBJ(infopipe_bar) {
+ double progress;
+ progress= atof(cur->infopipe.items[INFOPIPE_USEC_POSITION]) /
+ atof(cur->infopipe.items[INFOPIPE_USEC_TIME]);
+ new_bar(p,obj->a,obj->b,(int)(progress*255.0f));
+ }
#endif
OBJ(top) {
if (obj->data.top.type == TOP_NAME
pvoid=(void*)pvoid; /* useless cast to avoid unused var warning */
/* I/O multiplexing timer */
- tm.tv_sec=10; /* high enough to reduce persistent select() failures */
+ tm.tv_sec=30; /* high enough to reduce persistent select() failures */
tm.tv_usec=0;
/* Grab the runnable signal. Should be non-zero here or we do nothing. */
ideally suited for a worker thread such as this. We don't want
to slow down ui updates in the main thread as there is already
excess latency there. */
- if ((i=select(fd+1,&readset,NULL,NULL,&tm)) == 1) { /* something to read */
+ if (select(fd+1,&readset,NULL,NULL,&tm) == 1) { /* something to read */
if (read(fd,buf,sizeof(buf)) > 0) { /* buf has data */
*/
}
}
- else {
- printf("select() says nothing to read: %d, fd %d\n",i,fd);
- }
if (close(fd) < 0) {
break;