Calculate count for periodic timer TTL

Since we're not able to stop multiple flashing timers from existing, we can instead calculate how many times they should loop before dying. This means that even though it is still possible for some slower machines to have multiple timers get created, we can at least guarantee that they will not last forever and only have a tiny overlap with one another.