NX was announced March 17, 2015 so a little less than 15 months. Either way, Nintendo handled that the best way it could. Announcing NX coincided with announcing its partnership with DeNA. Had Nintendo not announced a new platform alongside its mobile push, it would have had to deal with speculation that it was leaving the hardware business considering how poorly Wii U was doing which would have tanked its stock. The timing was all intentional. Nintendo announces its partnership with DeNA right before the end of fiscal year then released its first mobile app, Miitomo, right before the end of the next fiscal year. It got to map out future while downplaying just how poorly Wii U was doing.
And not talking about NX since announcing it was also the best way to handle that situation. Nintendo had to throw Wii U under the bus except it was still stuck with the console for what, another 20 months. Wii U was getting replaced sooner rather than later, but Nintendo really had no other choice other than to continue supporting it. Not an ideal scenario by any metric though Nintendo surprisingly handled it well all things considered.