suppose scientists can clone any person both their body and mind. In one case I agree when I am sleep I am killed and cloned again. When I woke up I won't notice any difference. It is just like going to sleep and wake up again. I do not mind doing this if it was possible. I feel I survive the execution.
In case two I am killed when I am awake. They can restore my mind just ten minutes before execution. When it is one minute to the execution, through a monitor the scientist show me my clone which has been waken up. Now, I do not feel good! and do not think I survive my execution.
What is the difference between the two case? Is it the ten minutes delay? Then, how short should it be to feel as if I survive?
I don't think I am the first person to come up with this thought experiment. Are there any resources to study about this? What are the keywords?