Il 27/06/2014 20:01, Hans-Peter Diettrich ha scritto:
Giuliano Colla schrieb:

If you're using relative times and not absolute ones, then you may avoid the search, without need to resort, using a slightly different scheme, i.e. entering in a sorted list the times *relatives to the previous one*.

Then your queue can run out of sync with the absolute time.

It depends on his needs. He's stated that hes not using absolute times, so I presume that absolute time is of no interest for him. Therefore I suggested a more efficient technique to handle relative times.
I don't see an advantage with using relative times, or unsorted lists.
On insertion a binary search over the list can be made, when the entries
are sorted by absolute time. Removal of entries occurs always from the
list head.

I don't either. But that's what he does.

Giuliano

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to