Welcome back, Kauko.
Is this the sketch you are using? Addition to emonTx
If it is, then inside loop( ), you need to get the time using micros( ) and calculate when the last pulse was. You know that from lastTime, but the difficulty you have is those timers overflow after approximately 70 minutes. Therefore, you must say that no pulse after (say) 60 minutes (60,000,000 µs) equals no power (but you can say a shorter time if you wish). You then set emontx.power = 0;.
You must do the maths on the times correctly so that the overflow - when the number reaches the maximum for an unsigned long integer and starts again at zero - is handled correctly:
if ((micros( ) - lastTime) > 60000000)
emontx.power = 0;
You cannot do this inside onPulse( ) because that part of the code is only executed when a pulse comes in.
I have not tested this, but I think it will work.