From 17bd34efc3705c9736e722e2078906fbab19a96f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 7 Mar 2012 18:07:50 +0000 Subject: set default poll time to 10ms since for most uses of serial at 115200 baud or less, the data doesn't come any faster than every 10ms svn path=/trunk/externals/iem/comport/; revision=16053 --- comport/comport.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'comport') diff --git a/comport/comport.c b/comport/comport.c index 1f8c93a..67ba462 100644 --- a/comport/comport.c +++ b/comport/comport.c @@ -1315,7 +1315,12 @@ allows COM port numbers to be specified. */ x->x_status_outlet = outlet_new(&x->x_obj, &s_float); x->x_hit = 0; - x->x_deltime = 1; + /* Since 10ms is also the default poll time for most HID devices, + * and it seems that for most uses of [comport] (i.e. arduinos and + * other serial ports 115200 baud or less) that 10ms polling is + * going to give the data as fast as 1ms polling with a lot less + * CPU time wasted. */ + x->x_deltime = 10; x->x_clock = clock_new(x, (t_method)comport_tick); clock_delay(x->x_clock, x->x_deltime); -- cgit v1.2.1