ifesdjeen / hashed-wheel-timer

High Performance Timer / Scheduler Library compatible with ScheduledExecutorService
Eclipse Public License 1.0
223 stars 43 forks source link

add pluggable nanosecond timer #7

Closed 0xg0nz0 closed 7 years ago

0xg0nz0 commented 7 years ago

Allow use of a native RDTSC call in place of System.nanoTime().

ifesdjeen commented 7 years ago

I think using a hashed wheel timer defines a native RDTSC timer. The latter suggests precision, while former deliberately trades precision for performance. So far nanoTime wasn't known to cause any performance trouble (unlike getCurrentMillis), but I'm willing to revise that thought if anyone has a good benchmark.

0xg0nz0 commented 7 years ago

I wrote an article on this: based on these findings I think you are right to close the issue.

http://www.cloudwall.io/hashed-wheel-timers