void delay_loop( unsigned long usec ) { Timestamp end; end.add( usec * 1e-6 ); Timestamp now; while ( now.before( end ) ) { now.setnow(); } }