Set a timer (stopwatch). Will print a message to the console (stderr) upon completion.
nng_timer(time)
time in ms. Non-integer values are translated to integer using
as.integer()
.
An external pointer to the thread created by this function.
The return value of this function should not normally be assigned as this preserves the thread instead of it being automatically reaped during garbage collection.
As reaping the thread waits until the timer has completed, a possible side effect is blocking garbage collection until this has happened (not guaranteed, as garbage collection may happen on other objects first). If this is undesirable, assign the external pointer to an object and then remove it after completion.