Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Big O of sf::Clock::restart()  (Read 4719 times)

0 Members and 1 Guest are viewing this topic.

xanderxylona

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Big O of sf::Clock::restart()
« on: April 18, 2019, 05:48:31 pm »
How fast is sf::Clock::restart()? That is to say, what is O(n) where n is the amount of times restart() is called? I am predisposed to assume that all ∆ time incurrence is linearithmic, but I'm not sure this is true for SFML.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Big O of sf::Clock::restart()
« Reply #1 on: April 18, 2019, 06:41:05 pm »
Are you sure you understand what Big O notation means?
Instead of using random technical terms, maybe just ask the question you're trying to solve. :D

When n is the amount of times you call restart() then you don't have to look at SFML's code, but your own to figure out how often you do call restart(). ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything