This'll force adding a semicolon to macro calls. Dunno why I missed
that, considering the version that didn't lock the mutex also didn't
have the last semicolon.
The biggest change is that the timestamp is pre-computed, because
calling strftime() 60 times (or more) per second is sure to have a
non-negligible cost.