4 ms·
That would be over-engineering. You want to keep your buffer full: if buffer not full: wait (time for 5 writes); write to 5 * read_size to buffer; Sure, you
by markessien 18y ago
That would be over-engineering. You want to keep your buffer full:
if buffer not full:
wait (time for 5 writes);
write to 5 * read_size to buffer;
Sure, you could do it more complex, but then you create fragile code at a spot when a simppler solution would work fine.
- adamo 18y agoBut even the fact that you have to decide on the buffer size is a matter of understanding the theory. Choosing to multiply by 5 too. Why is it 5 and 12? Why the buffer size is not the half or double the size that it has? How can you prove that you have chosen the correct values if not by theory?