would there be a better way of just updating the c...
# stdlib
a
would there be a better way of just updating the count somehow
c
updated code, now you only have each event in memory until it gets counted
here you go, final memory efficient version
you could also use
System.currentSystemMillies()
instead of
Instant.now()
to make it even more efficient.