buffer_timed_flush.c (400B)
1 /* ISC license. */ 2 3 #include <skalibs/buffer.h> 4 #include <skalibs/functypes.h> 5 #include <skalibs/unix-timed.h> 6 7 static int buffer_isnonempty (buffer *b) 8 { 9 return !buffer_isempty(b) ; 10 } 11 12 int buffer_timed_flush (buffer *b, tain const *deadline, tain *stamp) 13 { 14 return timed_flush(b, (init_func_ref)&buffer_getfd, (init_func_ref)&buffer_isnonempty, (init_func_ref)&buffer_flush, deadline, stamp) ; 15 }