SFML community forums

Help => General => Topic started by: digimikeh on April 11, 2021, 02:07:12 am

Title: understand sf::Time
Post by: digimikeh on April 11, 2021, 02:07:12 am
Hi!

does sf::Time stores an static point of time from clock or it is constantly taking the time from clock?...

example:

sf::Clock clk;
//do some things
sf::Time t0 = clk.getElapsedTime();             //N0
//... do some other things that take a while
std::cout << t0.asSeconds();                       //N1
 


N0: lets suppose here the time is 0.002

N1: does t0 is the same time point as before or it will print a later value?.. for instance 0.01

Oh yeah!!.. i have tried it on my own... but stdout prints an e+10 very large number...
Thanks
Title: Re: understand sf::Time
Post by: Nexus on April 11, 2021, 04:29:36 pm
sf::Time is simply a value. It doesn't change on its own.