I don't get the connection. You have a multithreaded program where you
output the non-deterministic results of when the threads get chosen
for execution by the kernel scheduler.
And of course a mouse move can change things, a mouse move results in
the kernel needing to execute some other code, changing the timing of
the executions of your code due to the interruptions. This is really
basic comp. arch. stuff here.
And you are worried about /dev/urandom (you really should use urandom,
the silly 'it blocks' aspect of /dev/random is, well, silly, and the
original reason given for why it did this has been thoroughly