added mutex around io. btw deathclock is not precise, using a system time function works a little better for killing something precisely at a known time