Another (simple) approach could be to restart the clock every frame (or loop/cycle/tick) but keep track of the amount of time passed and just add the duration of each frame to that total time.
So, your current code would look something like this:
sf::Time time;
sf::Clock clock;
sf::Time frameTime{ clock.restart(); } // sf::Clock's restart also returns the current elapsed time before restarting.
time += frameTime;
if (time.asSeconds() > 1.f) { time = sf::seconds(1.f); }
But, you could 'subtract' 1 each time so that it's still within the 0-1 range but in the correct part.
For example, if it's actually at 1.2 seconds, it's the 1 and also 0.2 of the next one. So, subtract 1 to get the 0.2.
However, to account for longer times, you'd need to loop the subtraction, thus:
while (time.asSeconds() > 1.f) { time -= sf::seconds(1.f); } // instead of "if (time.asSeconds...."
This seems to be what you are asking about - keeping it within the looping 1 - but I'm not completely certain what your aim is.
Also, if you'd like to read about more clocking approaches, consider reading about time steps; most specifically:
https://gafferongames.com/post/fix_your_timestep/If you find the article too complicated (I did at first too, for sure) or maybe grasped some but not all, you can consider using Kairos'
Timestep Lite. It's a small class that can help control your time step automatically. It's basically an implementation of the approach in that article.
If you'd like fuller control, you can use Kairos'
Timestep, which is similar but doesn't need external clocks, allows changing the speed of time and also provides alphas for frame interpolation. However, it does require all of the
Kairos library, although it's still a small library anyway.